Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Side by Side Diff: chrome/common/extensions/chrome_extension_messages.h

Issue 363563004: Move extensions-only render IPC messages into the extension messages header. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/common_message_generator.h ('k') | chrome/common/render_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Chrome-specific IPC messages for extensions. 5 // Chrome-specific IPC messages for extensions.
6 // Extension-related messages that aren't specific to Chrome live in 6 // Extension-related messages that aren't specific to Chrome live in
7 // extensions/common/extension_messages.h. 7 // extensions/common/extension_messages.h.
8 // 8 //
9 // Multiply-included message file, hence no include guard. 9 // Multiply-included message file, hence no include guard.
10 10
11 #include <string>
12
13 #include "base/strings/string16.h"
11 #include "chrome/common/extensions/api/webstore/webstore_api_constants.h" 14 #include "chrome/common/extensions/api/webstore/webstore_api_constants.h"
12 #include "chrome/common/web_application_info.h" 15 #include "chrome/common/web_application_info.h"
16 #include "extensions/common/stack_frame.h"
13 #include "ipc/ipc_message_macros.h" 17 #include "ipc/ipc_message_macros.h"
18 #include "url/gurl.h"
14 19
15 #define IPC_MESSAGE_START ChromeExtensionMsgStart 20 #define IPC_MESSAGE_START ChromeExtensionMsgStart
16 21
17 IPC_ENUM_TRAITS_MAX_VALUE(extensions::api::webstore::InstallStage, 22 IPC_ENUM_TRAITS_MAX_VALUE(extensions::api::webstore::InstallStage,
18 extensions::api::webstore::INSTALL_STAGE_INSTALLING) 23 extensions::api::webstore::INSTALL_STAGE_INSTALLING)
19 24
25 IPC_STRUCT_TRAITS_BEGIN(extensions::StackFrame)
26 IPC_STRUCT_TRAITS_MEMBER(line_number)
27 IPC_STRUCT_TRAITS_MEMBER(column_number)
28 IPC_STRUCT_TRAITS_MEMBER(source)
29 IPC_STRUCT_TRAITS_MEMBER(function)
30 IPC_STRUCT_TRAITS_END()
31
20 IPC_STRUCT_TRAITS_BEGIN(WebApplicationInfo::IconInfo) 32 IPC_STRUCT_TRAITS_BEGIN(WebApplicationInfo::IconInfo)
21 IPC_STRUCT_TRAITS_MEMBER(url) 33 IPC_STRUCT_TRAITS_MEMBER(url)
22 IPC_STRUCT_TRAITS_MEMBER(width) 34 IPC_STRUCT_TRAITS_MEMBER(width)
23 IPC_STRUCT_TRAITS_MEMBER(height) 35 IPC_STRUCT_TRAITS_MEMBER(height)
24 IPC_STRUCT_TRAITS_MEMBER(data) 36 IPC_STRUCT_TRAITS_MEMBER(data)
25 IPC_STRUCT_TRAITS_END() 37 IPC_STRUCT_TRAITS_END()
26 38
27 IPC_STRUCT_TRAITS_BEGIN(WebApplicationInfo) 39 IPC_STRUCT_TRAITS_BEGIN(WebApplicationInfo)
28 IPC_STRUCT_TRAITS_MEMBER(title) 40 IPC_STRUCT_TRAITS_MEMBER(title)
29 IPC_STRUCT_TRAITS_MEMBER(description) 41 IPC_STRUCT_TRAITS_MEMBER(description)
30 IPC_STRUCT_TRAITS_MEMBER(app_url) 42 IPC_STRUCT_TRAITS_MEMBER(app_url)
31 IPC_STRUCT_TRAITS_MEMBER(icons) 43 IPC_STRUCT_TRAITS_MEMBER(icons)
32 IPC_STRUCT_TRAITS_END() 44 IPC_STRUCT_TRAITS_END()
33 45
34 // Messages sent from the browser to the renderer. 46 // Messages sent from the browser to the renderer.
35 47
36 // Requests application info for the page. The renderer responds back with 48 // Requests application info for the page. The renderer responds back with
37 // ExtensionHostMsg_DidGetApplicationInfo. 49 // ExtensionHostMsg_DidGetApplicationInfo.
38 IPC_MESSAGE_ROUTED1(ChromeExtensionMsg_GetApplicationInfo, 50 IPC_MESSAGE_ROUTED1(ChromeExtensionMsg_GetApplicationInfo,
39 int32 /* page_id */) 51 int32 /* page_id */)
40 52
41 // Sent by the renderer to implement chrome.webstore.install(). 53 // Set the top-level frame to the provided name.
42 IPC_MESSAGE_ROUTED5(ExtensionHostMsg_InlineWebstoreInstall, 54 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetName,
43 int32 /* install id */, 55 std::string /* frame_name */)
44 int32 /* return route id */, 56
45 std::string /* Web Store item ID */, 57 // Toggles visual muting of the render view area. This is on when a constrained
46 GURL /* requestor URL */, 58 // window is showing.
47 int /* listeners_mask */) 59 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetVisuallyDeemphasized,
60 bool /* deemphazied */)
48 61
49 // Sent to the renderer if install stage updates were requested for an inline 62 // Sent to the renderer if install stage updates were requested for an inline
50 // install. 63 // install.
51 IPC_MESSAGE_ROUTED1(ExtensionMsg_InlineInstallStageChanged, 64 IPC_MESSAGE_ROUTED1(ExtensionMsg_InlineInstallStageChanged,
52 extensions::api::webstore::InstallStage /* stage */) 65 extensions::api::webstore::InstallStage /* stage */)
53 66
54 // Sent to the renderer if download progress updates were requested for an 67 // Sent to the renderer if download progress updates were requested for an
55 // inline install. 68 // inline install.
56 IPC_MESSAGE_ROUTED1(ExtensionMsg_InlineInstallDownloadProgress, 69 IPC_MESSAGE_ROUTED1(ExtensionMsg_InlineInstallDownloadProgress,
57 int /* percent_downloaded */) 70 int /* percent_downloaded */)
58 71
59 // Send to renderer once the installation mentioned on 72 // Send to renderer once the installation mentioned on
60 // ExtensionHostMsg_InlineWebstoreInstall is complete. 73 // ExtensionHostMsg_InlineWebstoreInstall is complete.
61 IPC_MESSAGE_ROUTED3(ExtensionMsg_InlineWebstoreInstallResponse, 74 IPC_MESSAGE_ROUTED3(ExtensionMsg_InlineWebstoreInstallResponse,
62 int32 /* install id */, 75 int32 /* install id */,
63 bool /* whether the install was successful */, 76 bool /* whether the install was successful */,
64 std::string /* error */) 77 std::string /* error */)
65 78
66 // Messages sent from the renderer to the browser. 79 // Messages sent from the renderer to the browser.
67 80
81 // Informs the browser of updated frame names.
82 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_UpdateFrameName,
83 bool /* is_top_level */,
84 std::string /* name */)
85
86 // Sent by the renderer to check if a URL has permission to trigger a clipboard
87 // read/write operation from the DOM.
88 IPC_SYNC_MESSAGE_CONTROL1_1(ChromeViewHostMsg_CanTriggerClipboardRead,
89 GURL /* origin */,
90 bool /* allowed */)
91 IPC_SYNC_MESSAGE_CONTROL1_1(ChromeViewHostMsg_CanTriggerClipboardWrite,
92 GURL /* origin */,
93 bool /* allowed */)
94
95 // Tells listeners that a detailed message was reported to the console by
96 // WebKit.
97 IPC_MESSAGE_ROUTED4(ChromeViewHostMsg_DetailedConsoleMessageAdded,
98 base::string16 /* message */,
99 base::string16 /* source */,
100 extensions::StackTrace /* stack trace */,
101 int32 /* severity level */)
Lei Zhang 2014/07/02 21:42:41 I suppose I should put a newline here.
102 // Sent by the renderer to implement chrome.webstore.install().
103 IPC_MESSAGE_ROUTED5(ExtensionHostMsg_InlineWebstoreInstall,
104 int32 /* install id */,
105 int32 /* return route id */,
106 std::string /* Web Store item ID */,
107 GURL /* requestor URL */,
108 int /* listeners_mask */)
109
68 IPC_MESSAGE_ROUTED2(ChromeExtensionHostMsg_DidGetApplicationInfo, 110 IPC_MESSAGE_ROUTED2(ChromeExtensionHostMsg_DidGetApplicationInfo,
69 int32 /* page_id */, 111 int32 /* page_id */,
70 WebApplicationInfo) 112 WebApplicationInfo)
OLDNEW
« no previous file with comments | « chrome/common/common_message_generator.h ('k') | chrome/common/render_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698