2009-09-09 15:00:14 -07:00
|
|
|
/* -*- Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 8 -*- */
|
2009-08-18 12:05:15 -07:00
|
|
|
/* vim: set sw=4 ts=8 et tw=80 ft=cpp : */
|
|
|
|
|
2009-08-25 16:07:22 -07:00
|
|
|
/* ***** BEGIN LICENSE BLOCK *****
|
|
|
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
|
|
*
|
|
|
|
* The contents of this file are subject to the Mozilla Public License Version
|
|
|
|
* 1.1 (the "License"); you may not use this file except in compliance with
|
|
|
|
* the License. You may obtain a copy of the License at
|
|
|
|
* http://www.mozilla.org/MPL/
|
|
|
|
*
|
|
|
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
* for the specific language governing rights and limitations under the
|
|
|
|
* License.
|
|
|
|
*
|
2009-09-09 15:00:14 -07:00
|
|
|
* The Original Code is Mozilla Content App.
|
2009-08-25 16:07:22 -07:00
|
|
|
*
|
|
|
|
* The Initial Developer of the Original Code is
|
2009-09-09 15:00:14 -07:00
|
|
|
* The Mozilla Foundation.
|
2009-08-25 16:07:22 -07:00
|
|
|
* Portions created by the Initial Developer are Copyright (C) 2009
|
|
|
|
* the Initial Developer. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Contributor(s):
|
|
|
|
*
|
|
|
|
* Alternatively, the contents of this file may be used under the terms of
|
|
|
|
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
|
|
|
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
|
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
* of those above. If you wish to allow use of your version of this file only
|
|
|
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
|
|
* use your version of this file under the terms of the MPL, indicate your
|
|
|
|
* decision by deleting the provisions above and replace them with the notice
|
|
|
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
* the provisions above, a recipient may use your version of this file under
|
|
|
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
|
|
*
|
|
|
|
* ***** END LICENSE BLOCK ***** */
|
|
|
|
|
2010-07-19 11:33:33 -07:00
|
|
|
include protocol PContent;
|
|
|
|
include protocol PContentDialog;
|
2010-04-27 00:12:38 -07:00
|
|
|
include protocol PDocumentRenderer;
|
|
|
|
include protocol PDocumentRendererShmem;
|
2010-06-04 06:58:22 -07:00
|
|
|
include protocol PDocumentRendererNativeID;
|
2010-05-13 10:44:51 -07:00
|
|
|
include protocol PGeolocationRequest;
|
2009-09-09 15:00:14 -07:00
|
|
|
|
2009-11-12 14:20:20 -08:00
|
|
|
include "mozilla/TabTypes.h";
|
2009-11-17 06:22:23 -08:00
|
|
|
include "TabMessageUtils.h";
|
2010-03-24 03:47:18 -07:00
|
|
|
include "gfxMatrix.h";
|
2010-05-13 10:44:51 -07:00
|
|
|
include "mozilla/net/NeckoMessageUtils.h";
|
2009-11-12 14:20:20 -08:00
|
|
|
|
2010-05-13 10:44:51 -07:00
|
|
|
using IPC::URI;
|
2009-10-28 13:41:46 -07:00
|
|
|
using MagicWindowHandle;
|
2009-11-17 06:22:23 -08:00
|
|
|
using RemoteDOMEvent;
|
2010-03-24 03:47:18 -07:00
|
|
|
using gfxMatrix;
|
2009-08-25 16:07:22 -07:00
|
|
|
|
|
|
|
namespace mozilla {
|
2009-09-09 15:00:14 -07:00
|
|
|
namespace dom {
|
2009-08-25 16:07:22 -07:00
|
|
|
|
2010-07-19 11:33:33 -07:00
|
|
|
rpc protocol PBrowser
|
2009-08-25 16:07:22 -07:00
|
|
|
{
|
2010-07-19 11:33:33 -07:00
|
|
|
manager PContent;
|
|
|
|
|
|
|
|
manages PContentDialog;
|
2009-10-29 10:58:31 -07:00
|
|
|
manages PDocumentRenderer;
|
2010-03-24 03:47:18 -07:00
|
|
|
manages PDocumentRendererShmem;
|
2010-06-04 06:58:22 -07:00
|
|
|
manages PDocumentRendererNativeID;
|
2010-05-13 10:44:51 -07:00
|
|
|
manages PGeolocationRequest;
|
2010-07-19 11:33:33 -07:00
|
|
|
|
|
|
|
both:
|
|
|
|
AsyncMessage(nsString aMessage, nsString aJSON);
|
2009-09-09 15:00:14 -07:00
|
|
|
|
2009-12-03 00:16:14 -08:00
|
|
|
child:
|
|
|
|
__delete__();
|
|
|
|
|
2009-11-05 10:14:22 -08:00
|
|
|
parent:
|
|
|
|
/**
|
|
|
|
* When child sends this message, parent should move focus to
|
|
|
|
* the next or previous focusable element.
|
|
|
|
*/
|
2010-07-19 11:33:33 -07:00
|
|
|
MoveFocus(bool forward);
|
2009-11-05 10:14:22 -08:00
|
|
|
|
2010-07-19 11:33:33 -07:00
|
|
|
Event(RemoteDOMEvent aEvent);
|
2009-12-31 17:35:55 -08:00
|
|
|
|
2010-07-19 11:33:33 -07:00
|
|
|
NotifyStateChange(PRUint32 stateFlags, nsresult status);
|
2010-03-26 11:39:39 -07:00
|
|
|
|
2010-07-19 11:33:33 -07:00
|
|
|
NotifyProgressChange(PRInt64 curSelfProgress,
|
2010-03-26 11:39:39 -07:00
|
|
|
PRInt64 maxSelfProgress,
|
|
|
|
PRInt64 curTotalProgress,
|
|
|
|
PRInt64 maxTotalProgress);
|
|
|
|
|
2010-07-19 11:33:33 -07:00
|
|
|
NotifyLocationChange(nsCString uri);
|
2010-03-26 11:39:39 -07:00
|
|
|
|
2010-07-19 11:33:33 -07:00
|
|
|
NotifyStatusChange(nsresult status,
|
2010-03-26 11:39:39 -07:00
|
|
|
nsString message);
|
|
|
|
|
2010-07-19 11:33:33 -07:00
|
|
|
NotifySecurityChange(PRUint32 aState);
|
2010-03-26 11:39:39 -07:00
|
|
|
|
2010-07-19 11:33:33 -07:00
|
|
|
sync RefreshAttempted(nsCString uri, PRInt32 millis,
|
2010-03-26 11:39:39 -07:00
|
|
|
bool sameURI) returns (bool retval);
|
|
|
|
|
|
|
|
|
2010-07-19 11:33:33 -07:00
|
|
|
rpc CreateWindow() returns (PBrowser window);
|
2010-02-20 09:05:20 -08:00
|
|
|
|
2010-07-19 11:33:33 -07:00
|
|
|
sync SyncMessage(nsString aMessage, nsString aJSON)
|
2010-03-29 13:29:45 -07:00
|
|
|
returns (nsString[] retval);
|
|
|
|
|
2010-05-13 10:44:51 -07:00
|
|
|
PGeolocationRequest(URI uri);
|
|
|
|
|
2010-05-17 04:25:22 -07:00
|
|
|
PContentDialog(PRUint32 aType, nsCString aName, nsCString aFeatures,
|
|
|
|
PRInt32[] aIntParams, nsString[] aStringParams);
|
|
|
|
|
2009-09-09 15:00:14 -07:00
|
|
|
child:
|
2010-07-19 11:33:33 -07:00
|
|
|
CreateWidget(MagicWindowHandle parentWidget);
|
2009-10-28 13:41:46 -07:00
|
|
|
|
2010-07-19 11:33:33 -07:00
|
|
|
LoadURL(nsCString uri);
|
2009-09-09 15:00:14 -07:00
|
|
|
|
2010-07-19 11:33:33 -07:00
|
|
|
Move(PRUint32 x,
|
2009-09-09 15:00:14 -07:00
|
|
|
PRUint32 y,
|
|
|
|
PRUint32 width,
|
|
|
|
PRUint32 height);
|
2009-10-29 10:58:31 -07:00
|
|
|
|
2009-11-05 10:14:22 -08:00
|
|
|
/**
|
|
|
|
* Sending an activate message moves focus to the child.
|
|
|
|
*/
|
2010-07-19 11:33:33 -07:00
|
|
|
Activate();
|
2010-03-18 23:52:18 -07:00
|
|
|
|
2009-11-17 06:22:23 -08:00
|
|
|
/**
|
2010-07-19 11:33:33 -07:00
|
|
|
* @see nsIDOMWindowUtils sendMouseEvent.
|
|
|
|
*/
|
|
|
|
MouseEvent(nsString aType,
|
|
|
|
float aX,
|
|
|
|
float aY,
|
|
|
|
PRInt32 aButton,
|
|
|
|
PRInt32 aClickCount,
|
|
|
|
PRInt32 aModifiers,
|
|
|
|
bool aIgnoreRootScrollFrame);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @see nsIDOMWindowUtils sendKeyEvent.
|
2009-11-17 06:22:23 -08:00
|
|
|
*/
|
2010-07-19 11:33:33 -07:00
|
|
|
KeyEvent(nsString aType,
|
|
|
|
PRInt32 aKeyCode,
|
|
|
|
PRInt32 aCharCode,
|
|
|
|
PRInt32 aModifiers,
|
|
|
|
bool aPreventDefault);
|
2009-11-17 06:22:23 -08:00
|
|
|
|
2010-07-19 11:33:33 -07:00
|
|
|
/**
|
|
|
|
* Activate event forwarding from client to parent.
|
|
|
|
*/
|
|
|
|
ActivateFrameEvent(nsString aType, bool capture);
|
2010-02-20 09:05:20 -08:00
|
|
|
|
2010-07-19 11:33:33 -07:00
|
|
|
LoadRemoteScript(nsString aURL);
|
2010-02-20 09:05:20 -08:00
|
|
|
|
2009-10-29 10:58:31 -07:00
|
|
|
PDocumentRenderer(PRInt32 x, PRInt32 y, PRInt32 w, PRInt32 h, nsString bgcolor, PRUint32 flags, bool flush);
|
2010-03-24 03:47:18 -07:00
|
|
|
|
|
|
|
// @param matrix the transformation matrix the context we're going to draw into should have.
|
|
|
|
PDocumentRendererShmem(PRInt32 x, PRInt32 y, PRInt32 w, PRInt32 h, nsString bgcolor, PRUint32 flags, bool flush,
|
2010-06-04 06:58:22 -07:00
|
|
|
gfxMatrix matrix, Shmem buf);
|
2010-03-24 03:47:18 -07:00
|
|
|
|
2010-06-04 06:58:22 -07:00
|
|
|
// @param matrix the transformation matrix the context we're going to draw into should have.
|
|
|
|
PDocumentRendererNativeID(PRInt32 x, PRInt32 y, PRInt32 w, PRInt32 h, nsString bgcolor, PRUint32 flags, bool flush,
|
|
|
|
gfxMatrix matrix, PRUint32 nativeID);
|
2009-08-25 16:07:22 -07:00
|
|
|
};
|
|
|
|
|
2009-09-09 15:00:14 -07:00
|
|
|
}
|
|
|
|
}
|