Skip to content

Commit

Permalink
Bug 1306708 - Rename prio to nested in IPDL (r=dvander)
Browse files Browse the repository at this point in the history
  • Loading branch information
bill-mccloskey committed Oct 5, 2016
1 parent a74fb19 commit f478d11
Show file tree
Hide file tree
Showing 28 changed files with 503 additions and 502 deletions.
248 changes: 124 additions & 124 deletions accessible/ipc/other/PDocAccessible.ipdl

Large diffs are not rendered by default.

68 changes: 34 additions & 34 deletions dom/ipc/PBrowser.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ union OptionalShmem
Shmem;
};

prio(normal upto urgent) sync protocol PBrowser
nested(upto inside_cpow) sync protocol PBrowser
{
manager PContent or PContentBridge;

Expand Down Expand Up @@ -204,8 +204,8 @@ parent:
CpowEntry[] aCpows, Principal aPrincipal)
returns (StructuredCloneData[] retval);

prio(high) sync RpcMessage(nsString aMessage, ClonedMessageData aData,
CpowEntry[] aCpows, Principal aPrincipal)
nested(inside_sync) sync RpcMessage(nsString aMessage, ClonedMessageData aData,
CpowEntry[] aCpows, Principal aPrincipal)
returns (StructuredCloneData[] retval);

/**
Expand All @@ -216,8 +216,8 @@ parent:
* notification Whole data of the notification
* preference Native widget preference for IME updates
*/
prio(urgent) sync NotifyIMEFocus(ContentCache contentCache,
IMENotification notification)
nested(inside_cpow) sync NotifyIMEFocus(ContentCache contentCache,
IMENotification notification)
returns (nsIMEUpdatePreference preference);

/**
Expand All @@ -228,16 +228,16 @@ parent:
* contentCache Cache of content
* notification Whole data of the notification
*/
prio(urgent) async NotifyIMETextChange(ContentCache contentCache,
IMENotification notification);
nested(inside_cpow) async NotifyIMETextChange(ContentCache contentCache,
IMENotification notification);

/**
* Notifies chrome that there is a IME compostion rect updated
*
* contentCache Cache of content
*/
prio(urgent) async NotifyIMECompositionUpdate(ContentCache contentCache,
IMENotification notification);
nested(inside_cpow) async NotifyIMECompositionUpdate(ContentCache contentCache,
IMENotification notification);

/**
* Notifies chrome that there has been a change in selection
Expand All @@ -246,32 +246,32 @@ parent:
* contentCache Cache of content
* notification Whole data of the notification
*/
prio(urgent) async NotifyIMESelection(ContentCache contentCache,
IMENotification notification);
nested(inside_cpow) async NotifyIMESelection(ContentCache contentCache,
IMENotification notification);

/**
* Notifies chrome of updating its content cache.
* This is useful if content is modified but we don't need to notify IME.
*
* contentCache Cache of content
*/
prio(urgent) async UpdateContentCache(ContentCache contentCache);
nested(inside_cpow) async UpdateContentCache(ContentCache contentCache);

/**
* Notifies IME of mouse button event on a character in focused editor.
*
* Returns true if the mouse button event is consumd by IME.
*/
prio(urgent) sync NotifyIMEMouseButtonEvent(IMENotification notification)
nested(inside_cpow) sync NotifyIMEMouseButtonEvent(IMENotification notification)
returns (bool consumedByIME);

/**
* Notifies chrome to position change
*
* contentCache Cache of content
*/
prio(urgent) async NotifyIMEPositionChange(ContentCache contentCache,
IMENotification notification);
nested(inside_cpow) async NotifyIMEPositionChange(ContentCache contentCache,
IMENotification notification);

/**
* Requests chrome to commit or cancel composition of IME.
Expand All @@ -285,7 +285,7 @@ parent:
* try to restore selected string which was
* replaced with the composition.
*/
prio(urgent) sync RequestIMEToCommitComposition(bool cancel)
nested(inside_cpow) sync RequestIMEToCommitComposition(bool cancel)
returns (bool isCommitted, nsString committedString);

/**
Expand All @@ -295,7 +295,7 @@ parent:
*
* message The message value of the handled event.
*/
prio(urgent) async OnEventNeedingAckHandled(EventMessage message);
nested(inside_cpow) async OnEventNeedingAckHandled(EventMessage message);

/**
* Tells chrome to start plugin IME. If this results in a string getting
Expand All @@ -306,9 +306,9 @@ parent:
* (should be just under the plugin)
* aCommitted The string committed during IME -- otherwise empty
*/
prio(urgent) sync StartPluginIME(WidgetKeyboardEvent aKeyboardEvent,
int32_t panelX, int32_t panelY)
returns (nsString aCommitted);
nested(inside_cpow) sync StartPluginIME(WidgetKeyboardEvent aKeyboardEvent,
int32_t panelX, int32_t panelY)
returns (nsString aCommitted);

/**
* Tells chrome (and specifically the appropriate widget) whether or not
Expand All @@ -317,7 +317,7 @@ parent:
*
* aFocused Whether or not a plugin is focused
*/
prio(urgent) async SetPluginFocused(bool aFocused);
nested(inside_cpow) async SetPluginFocused(bool aFocused);

/**
* Set IME candidate window by windowless plugin if plugin has focus.
Expand All @@ -332,7 +332,7 @@ parent:
* NativeEventData depending on the caller. Please check
* PluginInstanceChild.
*/
prio(urgent) async OnWindowedPluginKeyEvent(NativeEventData aKeyEventData);
nested(inside_cpow) async OnWindowedPluginKeyEvent(NativeEventData aKeyEventData);

/**
* When plugin event isn't consumed, call this
Expand All @@ -353,16 +353,16 @@ parent:
nsCString[] enabledCommands,
nsCString[] disabledCommands);

prio(urgent) sync GetInputContext() returns (int32_t IMEEnabled,
int32_t IMEOpen);
nested(inside_cpow) sync GetInputContext() returns (int32_t IMEEnabled,
int32_t IMEOpen);

prio(urgent) async SetInputContext(int32_t IMEEnabled,
int32_t IMEOpen,
nsString type,
nsString inputmode,
nsString actionHint,
int32_t cause,
int32_t focusChange);
nested(inside_cpow) async SetInputContext(int32_t IMEEnabled,
int32_t IMEOpen,
nsString type,
nsString inputmode,
nsString actionHint,
int32_t cause,
int32_t focusChange);

sync IsParentWindowMainWidgetVisible() returns (bool visible);

Expand Down Expand Up @@ -579,9 +579,9 @@ parent:
*/
async SetDimensions(uint32_t aFlags, int32_t aX, int32_t aY, int32_t aCx, int32_t aCy);

prio(high) sync DispatchWheelEvent(WidgetWheelEvent event);
prio(high) sync DispatchMouseEvent(WidgetMouseEvent event);
prio(high) sync DispatchKeyboardEvent(WidgetKeyboardEvent event);
nested(inside_sync) sync DispatchWheelEvent(WidgetWheelEvent event);
nested(inside_sync) sync DispatchMouseEvent(WidgetMouseEvent event);
nested(inside_sync) sync DispatchKeyboardEvent(WidgetKeyboardEvent event);

async InvokeDragSession(IPCDataTransfer[] transfers, uint32_t action,
OptionalShmem visualData,
Expand Down
20 changes: 10 additions & 10 deletions dom/ipc/PContent.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ struct BlobURLRegistrationData
Principal principal;
};

prio(normal upto urgent) sync protocol PContent
nested(upto inside_cpow) sync protocol PContent
{
parent spawns PPluginModule;

Expand Down Expand Up @@ -843,7 +843,7 @@ parent:
sync GetLookAndFeelCache()
returns (LookAndFeelInt[] lookAndFeelIntCache);

prio(urgent) async PHal();
nested(inside_cpow) async PHal();

async PHeapSnapshotTempFileHelper();

Expand All @@ -857,7 +857,7 @@ parent:

async PSendStream();

prio(high) sync PScreenManager()
nested(inside_sync) sync PScreenManager()
returns (uint32_t numberOfScreens,
float systemDefaultScale,
bool success);
Expand All @@ -868,7 +868,7 @@ parent:

async PSpeechSynthesis();

prio(urgent) async PStorage();
nested(inside_cpow) async PStorage();

async PTelephony();

Expand Down Expand Up @@ -908,8 +908,8 @@ parent:
CpowEntry[] aCpows, Principal aPrincipal)
returns (StructuredCloneData[] retval);

prio(high) sync RpcMessage(nsString aMessage, ClonedMessageData aData,
CpowEntry[] aCpows, Principal aPrincipal)
nested(inside_sync) sync RpcMessage(nsString aMessage, ClonedMessageData aData,
CpowEntry[] aCpows, Principal aPrincipal)
returns (StructuredCloneData[] retval);

async ShowAlert(AlertNotificationType alert);
Expand Down Expand Up @@ -1057,10 +1057,10 @@ parent:
* before one is submitted. This is urgent because an extension might use
* a CPOW to synchronously submit a keygen element.
*/
prio(urgent) sync KeygenProcessValue(nsString oldValue,
nsString challenge,
nsString keytype,
nsString keyparams)
nested(inside_cpow) sync KeygenProcessValue(nsString oldValue,
nsString challenge,
nsString keytype,
nsString keyparams)
returns (nsString newValue);

/**
Expand Down
2 changes: 1 addition & 1 deletion dom/ipc/PContentBridge.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace dom {
* allocate the PContentBridgeChild. This protocol allows these processes to
* share PBrowsers and send messages to each other.
*/
prio(normal upto urgent) sync protocol PContentBridge
nested(upto inside_cpow) sync protocol PContentBridge
{
bridges PContent, PContent;

Expand Down
18 changes: 9 additions & 9 deletions dom/ipc/PScreenManager.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -25,32 +25,32 @@ struct ScreenDetails {
double contentsScaleFactor;
};

prio(normal upto high) sync protocol PScreenManager
nested(upto inside_sync) sync protocol PScreenManager
{
manager PContent;

parent:
prio(high) sync Refresh()
nested(inside_sync) sync Refresh()
returns (uint32_t numberOfScreens,
float systemDefaultScale,
bool success);

prio(high) sync ScreenRefresh(uint32_t aId)
nested(inside_sync) sync ScreenRefresh(uint32_t aId)
returns (ScreenDetails screen,
bool success);

prio(high) sync GetPrimaryScreen()
nested(inside_sync) sync GetPrimaryScreen()
returns (ScreenDetails screen,
bool success);

prio(high) sync ScreenForRect(int32_t aLeft,
int32_t aTop,
int32_t aWidth,
int32_t aHeight)
nested(inside_sync) sync ScreenForRect(int32_t aLeft,
int32_t aTop,
int32_t aWidth,
int32_t aHeight)
returns (ScreenDetails screen,
bool success);

prio(high) sync ScreenForBrowser(TabId aTabId)
nested(inside_sync) sync ScreenForBrowser(TabId aTabId)
returns (ScreenDetails screen,
bool success);

Expand Down
4 changes: 2 additions & 2 deletions dom/storage/PStorage.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ namespace dom {
/* This protocol bridges async access to the database thread running on the parent process
* and caches running on the child process.
*/
prio(normal upto urgent) sync protocol PStorage
nested(upto inside_cpow) sync protocol PStorage
{
manager PContent;

parent:
async __delete__();

prio(urgent) sync Preload(nsCString originSuffix, nsCString originNoSuffix, uint32_t alreadyLoadedCount)
nested(inside_cpow) sync Preload(nsCString originSuffix, nsCString originNoSuffix, uint32_t alreadyLoadedCount)
returns (nsString[] keys, nsString[] values, nsresult rv);

async AsyncPreload(nsCString originSuffix, nsCString originNoSuffix, bool priority);
Expand Down
4 changes: 2 additions & 2 deletions hal/sandbox/PHal.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ struct SystemTimezoneChangeInformation {

namespace hal_sandbox {

prio(normal upto urgent) sync protocol PHal {
nested(upto inside_cpow) sync protocol PHal {
manager PContent;

child:
Expand Down Expand Up @@ -156,7 +156,7 @@ parent:

async EnableScreenConfigurationNotifications();
async DisableScreenConfigurationNotifications();
prio(urgent) sync GetCurrentScreenConfiguration()
nested(inside_cpow) sync GetCurrentScreenConfiguration()
returns (ScreenConfiguration aScreenConfiguration);
sync LockScreenOrientation(ScreenOrientationInternal aOrientation)
returns (bool allowed);
Expand Down
6 changes: 2 additions & 4 deletions ipc/chromium/src/chrome/common/ipc_channel_posix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,7 @@ void Channel::ChannelImpl::ResetFileDescriptor(int fd) {

bool Channel::ChannelImpl::EnqueueHelloMessage() {
mozilla::UniquePtr<Message> msg(new Message(MSG_ROUTING_NONE,
HELLO_MESSAGE_TYPE,
IPC::Message::PRIORITY_NORMAL));
HELLO_MESSAGE_TYPE));
if (!msg->WriteInt(base::GetCurrentProcId())) {
Close();
return false;
Expand Down Expand Up @@ -500,8 +499,7 @@ bool Channel::ChannelImpl::ProcessIncomingMessages() {
// Send a message to the other side, indicating that we are now
// responsible for closing the descriptor.
Message *fdAck = new Message(MSG_ROUTING_NONE,
RECEIVED_FDS_MESSAGE_TYPE,
IPC::Message::PRIORITY_NORMAL);
RECEIVED_FDS_MESSAGE_TYPE);
DCHECK(m.fd_cookie() != 0);
fdAck->set_fd_cookie(m.fd_cookie());
OutputQueuePush(fdAck);
Expand Down
3 changes: 1 addition & 2 deletions ipc/chromium/src/chrome/common/ipc_channel_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,7 @@ bool Channel::ChannelImpl::CreatePipe(const std::wstring& channel_id,

bool Channel::ChannelImpl::EnqueueHelloMessage() {
mozilla::UniquePtr<Message> m = mozilla::MakeUnique<Message>(MSG_ROUTING_NONE,
HELLO_MESSAGE_TYPE,
IPC::Message::PRIORITY_NORMAL);
HELLO_MESSAGE_TYPE);

// If we're waiting for our shared secret from the other end's hello message
// then don't give the game away by sending it in ours.
Expand Down
6 changes: 4 additions & 2 deletions ipc/chromium/src/chrome/common/ipc_message.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,15 @@ Message::Message()
InitLoggingVariables();
}

Message::Message(int32_t routing_id, msgid_t type, PriorityValue priority,
Message::Message(int32_t routing_id, msgid_t type, NestedLevel nestedLevel, PriorityValue priority,
MessageCompression compression, const char* const aName)
: Pickle(sizeof(Header)) {
MOZ_COUNT_CTOR(IPC::Message);
header()->routing = routing_id;
header()->type = type;
header()->flags = priority;
header()->flags = nestedLevel;
if (priority == HIGH_PRIORITY)
header()->flags |= PRIO_BIT;
if (compression == COMPRESSION_ENABLED)
header()->flags |= COMPRESS_BIT;
else if (compression == COMPRESSION_ALL)
Expand Down
Loading

0 comments on commit f478d11

Please sign in to comment.