-
Notifications
You must be signed in to change notification settings - Fork 16
/
PEmbedLiteView.ipdl
126 lines (109 loc) · 4.86 KB
/
PEmbedLiteView.ipdl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
include protocol PEmbedLiteApp;
include "ipc/nsGUIEventIPC.h";
include "ipc/InputDataIPC.h";
include "mozilla/GfxMessageUtils.h";
using struct gfxSize from "gfxPoint.h";
using gfxRect from "mozilla/GfxMessageUtils.h";
using CSSRect from "Units.h";
using CSSSize from "Units.h";
using struct nsIntSize from "nsSize.h";
using struct gfxPoint from "gfxPoint.h";
using struct nsIntPoint from "nsPoint.h";
using struct mozilla::layers::FrameMetrics from "FrameMetrics.h";
using struct mozilla::layers::ScrollableLayerGuid from "FrameMetrics.h";
using FrameMetrics::ViewID from "FrameMetrics.h";
using nscolor from "nsColor.h";
using class mozilla::WidgetKeyboardEvent from "ipc/nsGUIEventIPC.h";
using class mozilla::WidgetMouseEvent from "ipc/nsGUIEventIPC.h";
using MultiTouchInput from "InputData.h";
using mozilla::CSSIntPoint from "Units.h";
using struct mozilla::layers::ZoomConstraints from "FrameMetrics.h";
using mozilla::CSSPoint from "Units.h";
namespace mozilla {
namespace embedlite {
prio(normal upto urgent) sync protocol PEmbedLiteView {
manager PEmbedLiteApp;
child:
LoadURL(nsString url);
GoBack();
GoForward();
StopLoad();
Reload(bool hardReload);
LoadFrameScript(nsString uri);
SetIsActive(bool aIsActive);
SetIsFocused(bool aIsFocused);
SetThrottlePainting(bool aThrottle);
SetMargins(int top, int right, int bottom, int left);
SuspendTimeouts();
ResumeTimeouts();
AsyncScrollDOMEvent(gfxRect contentRect, gfxSize scrollSize);
UpdateFrame(FrameMetrics frame) compress;
HandleDoubleTap(CSSPoint aPoint, int32_t aModifiers, ScrollableLayerGuid aGuid);
HandleSingleTap(CSSPoint aPoint, int32_t aModifiers, ScrollableLayerGuid aGuid);
HandleLongTap(CSSPoint aPoint, ScrollableLayerGuid aGuid, uint64_t aInputBlockId);
AcknowledgeScrollUpdate(ViewID aScrollId, uint32_t aScrollGeneration);
HandleTextEvent(nsString commit, nsString preEdit);
HandleKeyPressEvent(int domKeyCode, int gmodifiers, int charCode);
HandleKeyReleaseEvent(int domKeyCode, int gmodifiers, int charCode);
MouseEvent(nsString aType, float aX, float aY,
int32_t aButton, int32_t aClickCount,
int32_t aModifiers, bool aIgnoreRootScrollFrame);
InputDataTouchEvent(ScrollableLayerGuid aGuid, MultiTouchInput event, uint64_t aInputBlockId);
// We use a separate message for touchmove events only to apply
// compression to them.
InputDataTouchMoveEvent(ScrollableLayerGuid aGuid, MultiTouchInput event, uint64_t aInputBlockId) compress;
AddMessageListener(nsCString name);
RemoveMessageListener(nsCString name);
AddMessageListeners(nsString [] messageNames);
RemoveMessageListeners(nsString [] messageNames);
Destroy();
parent:
Initialized();
Destroyed();
__delete__();
OnLocationChanged(nsCString aLocation, bool aCanGoBack, bool aCanGoForward);
OnLoadStarted(nsCString aLocation);
OnLoadFinished();
OnLoadRedirect();
OnLoadProgress(int32_t aProgress, int32_t aCurTotal, int32_t aMaxTotal);
OnSecurityChanged(nsCString aStatus, uint32_t aState);
OnFirstPaint(int32_t aX, int32_t aY);
OnScrolledAreaChanged(uint32_t aWidth, uint32_t aHeight);
OnScrollChanged(int32_t offSetX, int32_t offSetY);
OnTitleChanged(nsString aTitle);
OnWindowCloseRequested();
/**
* Updates the zoom constraints for a scrollable frame in this tab.
* The zoom controller code lives on the parent side and so this allows it to
* have up-to-date zoom constraints.
*/
UpdateZoomConstraints(uint32_t aPresShellId, ViewID aViewId, bool aIsRoot,
ZoomConstraints aConstraints);
/**
* Instructs the EmbedLiteViewThreadParent to forward a request to zoom to a rect given in
* CSS pixels. This rect is relative to the document.
*/
ZoomToRect(uint32_t aPresShellId, ViewID aViewId, CSSRect aRect);
SetBackgroundColor(nscolor color);
ContentReceivedInputBlock(ScrollableLayerGuid aGuid, uint64_t aInputBlockId, bool aPreventDefault);
sync SyncMessage(nsString aMessage, nsString aJSON)
returns (nsString[] retval);
prio(high) sync RpcMessage(nsString aMessage, nsString aJSON)
returns (nsString[] retval);
// IME
sync GetInputContext() returns (int32_t IMEEnabled, int32_t IMEOpen,
intptr_t NativeIMEContext);
SetInputContext(int32_t IMEEnabled,
int32_t IMEOpen,
nsString type,
nsString inputmode,
nsString actionHint,
int32_t cause,
int32_t focusChange);
both:
AsyncMessage(nsString aMessage, nsString aData);
};
}}