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

Side by Side Diff: chrome/common/render_messages.h

Issue 6721021: Move a bunch of renderer->browser messages to content. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // Multiply-included file, no traditional include guard. 5 // Multiply-included file, no traditional include guard.
6 #include <map> 6 #include <map>
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 16 matching lines...) Expand all
27 #include "chrome/common/extensions/extension_extent.h" 27 #include "chrome/common/extensions/extension_extent.h"
28 #include "chrome/common/extensions/url_pattern.h" 28 #include "chrome/common/extensions/url_pattern.h"
29 #include "chrome/common/instant_types.h" 29 #include "chrome/common/instant_types.h"
30 #include "chrome/common/nacl_types.h" 30 #include "chrome/common/nacl_types.h"
31 #include "chrome/common/render_messages_params.h" 31 #include "chrome/common/render_messages_params.h"
32 #include "chrome/common/thumbnail_score.h" 32 #include "chrome/common/thumbnail_score.h"
33 #include "chrome/common/translate_errors.h" 33 #include "chrome/common/translate_errors.h"
34 #include "chrome/common/view_types.h" 34 #include "chrome/common/view_types.h"
35 #include "chrome/common/web_apps.h" 35 #include "chrome/common/web_apps.h"
36 #include "chrome/common/webkit_param_traits.h" 36 #include "chrome/common/webkit_param_traits.h"
37 #include "chrome/common/window_container_type.h"
38 #include "content/common/common_param_traits.h" 37 #include "content/common/common_param_traits.h"
39 #include "content/common/css_colors.h" 38 #include "content/common/css_colors.h"
40 #include "content/common/notification_type.h" 39 #include "content/common/notification_type.h"
41 #include "content/common/page_transition_types.h" 40 #include "content/common/page_transition_types.h"
42 #include "content/common/page_zoom.h" 41 #include "content/common/page_zoom.h"
43 #include "content/common/resource_response.h" 42 #include "content/common/resource_response.h"
44 #include "ipc/ipc_channel_handle.h" 43 #include "ipc/ipc_channel_handle.h"
45 #include "ipc/ipc_message_macros.h" 44 #include "ipc/ipc_message_macros.h"
46 #include "ipc/ipc_message_utils.h" 45 #include "ipc/ipc_message_utils.h"
47 #include "ipc/ipc_platform_file.h" // ifdefed typedef. 46 #include "ipc/ipc_platform_file.h" // ifdefed typedef.
48 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderli ne.h" 47 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderli ne.h"
49 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerAction. h" 48 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerAction. h"
50 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h"
51 #include "third_party/skia/include/core/SkBitmap.h" 49 #include "third_party/skia/include/core/SkBitmap.h"
52 #include "ui/gfx/rect.h" 50 #include "ui/gfx/rect.h"
53 #include "webkit/glue/webaccessibility.h" 51 #include "webkit/glue/webaccessibility.h"
54 #include "webkit/glue/webcookie.h"
55 #include "webkit/glue/webcursor.h" 52 #include "webkit/glue/webcursor.h"
56 #include "webkit/plugins/npapi/webplugin.h"
57 #include "webkit/plugins/npapi/webplugininfo.h"
58 53
59 #if defined(OS_POSIX) 54 #if defined(OS_POSIX)
60 #include "base/file_descriptor_posix.h" 55 #include "base/file_descriptor_posix.h"
61 #endif 56 #endif
62 57
63 #if defined(OS_MACOSX)
64 #include "content/common/font_descriptor_mac.h"
65 #endif
66
67 // TODO(mpcomplete): rename ViewMsg and ViewHostMsg to something that makes 58 // TODO(mpcomplete): rename ViewMsg and ViewHostMsg to something that makes
68 // more sense with our current design. 59 // more sense with our current design.
69 60
70 // Singly-included section, not yet converted. 61 // Singly-included section, not yet converted.
71 #ifndef CHROME_COMMON_RENDER_MESSAGES_H_ 62 #ifndef CHROME_COMMON_RENDER_MESSAGES_H_
72 #define CHROME_COMMON_RENDER_MESSAGES_H_ 63 #define CHROME_COMMON_RENDER_MESSAGES_H_
73 64
74 // IPC_MESSAGE macros choke on extra , in the std::map, when expanding. We need 65 // IPC_MESSAGE macros choke on extra , in the std::map, when expanding. We need
75 // to typedef it to avoid that. 66 // to typedef it to avoid that.
76 // Substitution map for l10n messages. 67 // Substitution map for l10n messages.
(...skipping 15 matching lines...) Expand all
92 // type taken from the enumeration v8::Testing::StressType. 83 // type taken from the enumeration v8::Testing::StressType.
93 // For the command kJavaScriptStressTestPrepareStressRun the parameter it the 84 // For the command kJavaScriptStressTestPrepareStressRun the parameter it the
94 // number of the stress run about to take place. 85 // number of the stress run about to take place.
95 enum ViewHostMsg_JavaScriptStressTestControl_Commands { 86 enum ViewHostMsg_JavaScriptStressTestControl_Commands {
96 kJavaScriptStressTestSetStressRunType = 0, 87 kJavaScriptStressTestSetStressRunType = 0,
97 kJavaScriptStressTestPrepareStressRun = 1, 88 kJavaScriptStressTestPrepareStressRun = 1,
98 }; 89 };
99 90
100 namespace IPC { 91 namespace IPC {
101 92
102 #if defined(OS_MACOSX)
103 // Traits for FontDescriptor structure to pack/unpack.
104 template <>
105 struct ParamTraits<FontDescriptor> {
106 typedef FontDescriptor param_type;
107 static void Write(Message* m, const param_type& p);
108 static bool Read(const Message* m, void** iter, param_type* p);
109 static void Log(const param_type& p, std::string* l);
110 };
111 #endif
112
113 template <>
114 struct ParamTraits<webkit::npapi::WebPluginGeometry> {
115 typedef webkit::npapi::WebPluginGeometry param_type;
116 static void Write(Message* m, const param_type& p);
117 static bool Read(const Message* m, void** iter, param_type* p);
118 static void Log(const param_type& p, std::string* l);
119 };
120
121 // Traits for ViewMsg_GetPlugins_Reply structure to pack/unpack.
122 template <>
123 struct ParamTraits<webkit::npapi::WebPluginMimeType> {
124 typedef webkit::npapi::WebPluginMimeType param_type;
125 static void Write(Message* m, const param_type& p);
126 static bool Read(const Message* m, void** iter, param_type* r);
127 static void Log(const param_type& p, std::string* l);
128 };
129
130 template <>
131 struct ParamTraits<webkit::npapi::WebPluginInfo> {
132 typedef webkit::npapi::WebPluginInfo param_type;
133 static void Write(Message* m, const param_type& p);
134 static bool Read(const Message* m, void** iter, param_type* r);
135 static void Log(const param_type& p, std::string* l);
136 };
137
138 #if defined(OS_POSIX) 93 #if defined(OS_POSIX)
139 94
140 // TODO(port): this shouldn't exist. However, the plugin stuff is really using 95 // TODO(port): this shouldn't exist. However, the plugin stuff is really using
141 // HWNDS (NativeView), and making Windows calls based on them. I've not figured 96 // HWNDS (NativeView), and making Windows calls based on them. I've not figured
142 // out the deal with plugins yet. 97 // out the deal with plugins yet.
143 template <> 98 template <>
144 struct ParamTraits<gfx::NativeView> { 99 struct ParamTraits<gfx::NativeView> {
145 typedef gfx::NativeView param_type; 100 typedef gfx::NativeView param_type;
146 static void Write(Message* m, const param_type& p) { 101 static void Write(Message* m, const param_type& p) {
147 NOTIMPLEMENTED(); 102 NOTIMPLEMENTED();
(...skipping 19 matching lines...) Expand all
167 122
168 // Traits for URLPattern. 123 // Traits for URLPattern.
169 template <> 124 template <>
170 struct ParamTraits<URLPattern> { 125 struct ParamTraits<URLPattern> {
171 typedef URLPattern param_type; 126 typedef URLPattern param_type;
172 static void Write(Message* m, const param_type& p); 127 static void Write(Message* m, const param_type& p);
173 static bool Read(const Message* m, void** iter, param_type* p); 128 static bool Read(const Message* m, void** iter, param_type* p);
174 static void Log(const param_type& p, std::string* l); 129 static void Log(const param_type& p, std::string* l);
175 }; 130 };
176 131
177 // Traits for WebCookie
178 template <>
179 struct ParamTraits<webkit_glue::WebCookie> {
180 typedef webkit_glue::WebCookie param_type;
181 static void Write(Message* m, const param_type& p);
182 static bool Read(const Message* m, void** iter, param_type* p);
183 static void Log(const param_type& p, std::string* l);
184 };
185
186 template <> 132 template <>
187 struct SimilarTypeTraits<TranslateErrors::Type> { 133 struct SimilarTypeTraits<TranslateErrors::Type> {
188 typedef int Type; 134 typedef int Type;
189 }; 135 };
190 136
191 template <> 137 template <>
192 struct SimilarTypeTraits<InstantCompleteBehavior> { 138 struct SimilarTypeTraits<InstantCompleteBehavior> {
193 typedef int Type; 139 typedef int Type;
194 }; 140 };
195 141
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 IPC_MESSAGE_ROUTED0(ViewMsg_GetMalwareDOMDetails) 498 IPC_MESSAGE_ROUTED0(ViewMsg_GetMalwareDOMDetails)
553 499
554 // Tells the renderer to begin phishing detection for the given toplevel URL 500 // Tells the renderer to begin phishing detection for the given toplevel URL
555 // which it has started loading. 501 // which it has started loading.
556 IPC_MESSAGE_ROUTED1(ViewMsg_StartPhishingDetection, GURL) 502 IPC_MESSAGE_ROUTED1(ViewMsg_StartPhishingDetection, GURL)
557 503
558 //----------------------------------------------------------------------------- 504 //-----------------------------------------------------------------------------
559 // TabContents messages 505 // TabContents messages
560 // These are messages sent from the renderer to the browser process. 506 // These are messages sent from the renderer to the browser process.
561 507
562 // Sent by the renderer when it is creating a new window. The browser creates
563 // a tab for it and responds with a ViewMsg_CreatingNew_ACK. If route_id is
564 // MSG_ROUTING_NONE, the view couldn't be created.
565 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_CreateWindow,
566 ViewHostMsg_CreateWindow_Params,
567 int /* route_id */,
568 int64 /* cloned_session_storage_namespace_id */)
569
570 // Similar to ViewHostMsg_CreateWindow, except used for sub-widgets, like
571 // <select> dropdowns. This message is sent to the TabContents that
572 // contains the widget being created.
573 IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_CreateWidget,
574 int /* opener_id */,
575 WebKit::WebPopupType /* popup type */,
576 int /* route_id */)
577
578 // Similar to ViewHostMsg_CreateWidget except the widget is a full screen
579 // window.
580 IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_CreateFullscreenWidget,
581 int /* opener_id */,
582 int /* route_id */)
583
584 // These three messages are sent to the parent RenderViewHost to display the
585 // page/widget that was created by
586 // CreateWindow/CreateWidget/CreateFullscreenWidget. routing_id
587 // refers to the id that was returned from the Create message above.
588 // The initial_position parameter is a rectangle in screen coordinates.
589 //
590 // FUTURE: there will probably be flags here to control if the result is
591 // in a new window.
592 IPC_MESSAGE_ROUTED4(ViewHostMsg_ShowView,
593 int /* route_id */,
594 WindowOpenDisposition /* disposition */,
595 gfx::Rect /* initial_pos */,
596 bool /* opened_by_user_gesture */)
597
598 IPC_MESSAGE_ROUTED2(ViewHostMsg_ShowWidget,
599 int /* route_id */,
600 gfx::Rect /* initial_pos */)
601
602 // Message to show a full screen widget.
603 IPC_MESSAGE_ROUTED1(ViewHostMsg_ShowFullscreenWidget,
604 int /* route_id */)
605
606 // This message is sent after ViewHostMsg_ShowView to cause the RenderView
607 // to run in a modal fashion until it is closed.
608 IPC_SYNC_MESSAGE_ROUTED0_0(ViewHostMsg_RunModal)
609
610 IPC_MESSAGE_CONTROL1(ViewHostMsg_UpdatedCacheStats, 508 IPC_MESSAGE_CONTROL1(ViewHostMsg_UpdatedCacheStats,
611 WebKit::WebCache::UsageStats /* stats */) 509 WebKit::WebCache::UsageStats /* stats */)
612 510
613 // Indicates the renderer is ready in response to a ViewMsg_New or
614 // a ViewMsg_CreatingNew_ACK.
615 IPC_MESSAGE_ROUTED0(ViewHostMsg_RenderViewReady)
616
617
618 // Indicates the renderer process is gone. This actually is sent by the
619 // browser process to itself, but keeps the interface cleaner.
620 IPC_MESSAGE_ROUTED2(ViewHostMsg_RenderViewGone,
621 int, /* this really is base::TerminationStatus */
622 int /* exit_code */)
623
624 // Sent by the renderer process to request that the browser close the view.
625 // This corresponds to the window.close() API, and the browser may ignore
626 // this message. Otherwise, the browser will generates a ViewMsg_Close
627 // message to close the view.
628 IPC_MESSAGE_ROUTED0(ViewHostMsg_Close)
629
630 // Sent by the renderer process to request that the browser move the view.
631 // This corresponds to the window.resizeTo() and window.moveTo() APIs, and
632 // the browser may ignore this message.
633 IPC_MESSAGE_ROUTED1(ViewHostMsg_RequestMove,
634 gfx::Rect /* position */)
635
636 // Notifies the browser that a frame in the view has changed. This message
637 // has a lot of parameters and is packed/unpacked by functions defined in
638 // render_messages.h.
639 IPC_MESSAGE_ROUTED1(ViewHostMsg_FrameNavigate,
640 ViewHostMsg_FrameNavigate_Params)
641
642 // Notifies the browser that we have session history information.
643 // page_id: unique ID that allows us to distinguish between history entries.
644 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateState,
645 int32 /* page_id */,
646 std::string /* state */)
647
648 // Notifies the browser that a document has been loaded in a frame.
649 IPC_MESSAGE_ROUTED1(ViewHostMsg_DocumentLoadedInFrame,
650 int64 /* frame_id */)
651
652 // Notifies the browser that a frame finished loading.
653 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidFinishLoad,
654 int64 /* frame_id */)
655
656 // Changes the title for the page in the UI when the page is navigated or the
657 // title changes.
658 // TODO(darin): use a UTF-8 string to reduce data size
659 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateTitle, int32, std::wstring)
660
661 // Changes the icon url for the page in the UI.
662 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateIconURL, int32, GURL)
663
664 // Change the encoding name of the page in UI when the page has detected
665 // proper encoding name.
666 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateEncoding,
667 std::string /* new encoding name */)
668
669 // Notifies the browser that we want to show a destination url for a potential
670 // action (e.g. when the user is hovering over a link).
671 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateTargetURL, int32, GURL)
672
673 // Sent when the renderer starts loading the page. This corresponds to
674 // WebKit's notion of the throbber starting. Note that sometimes you may get
675 // duplicates of these during a single load.
676 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidStartLoading)
677
678 // Sent when the renderer is done loading a page. This corresponds to WebKit's
679 // notion of the throbber stopping.
680 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidStopLoading)
681
682 // Sent when the renderer main frame has made progress loading.
683 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidChangeLoadProgress,
684 double /* load_progress */)
685
686 // Sent when the document element is available for the toplevel frame. This
687 // happens after the page starts loading, but before all resources are
688 // finished.
689 IPC_MESSAGE_ROUTED0(ViewHostMsg_DocumentAvailableInMainFrame)
690
691 // Sent when after the onload handler has been invoked for the document
692 // in the toplevel frame.
693 IPC_MESSAGE_ROUTED1(ViewHostMsg_DocumentOnLoadCompletedInMainFrame,
694 int32 /* page_id */)
695
696 // Sent when the renderer loads a resource from its memory cache.
697 // The security info is non empty if the resource was originally loaded over
698 // a secure connection.
699 // Note: May only be sent once per URL per frame per committed load.
700 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidLoadResourceFromMemoryCache,
701 GURL /* url */,
702 std::string /* security info */)
703
704 // Sent when the renderer displays insecure content in a secure page.
705 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidDisplayInsecureContent)
706
707 // Sent when the renderer runs insecure content in a secure origin.
708 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidRunInsecureContent,
709 std::string /* security_origin */,
710 GURL /* target URL */)
711
712 // Sent when the renderer starts a provisional load for a frame.
713 IPC_MESSAGE_ROUTED3(ViewHostMsg_DidStartProvisionalLoadForFrame,
714 int64 /* frame_id */,
715 bool /* true if it is the main frame */,
716 GURL /* url */)
717
718 // Sent when the renderer fails a provisional load with an error.
719 IPC_MESSAGE_ROUTED5(ViewHostMsg_DidFailProvisionalLoadWithError,
720 int64 /* frame_id */,
721 bool /* true if it is the main frame */,
722 int /* error_code */,
723 GURL /* url */,
724 bool /* true if the failure is the result of
725 navigating to a POST again and we're going to
726 show the POST interstitial */)
727
728 // Tells the render view that a ViewHostMsg_PaintAtSize message was
729 // processed, and the DIB is ready for use. |tag| has the same value that
730 // the tag sent along with ViewMsg_PaintAtSize.
731 IPC_MESSAGE_ROUTED2(ViewHostMsg_PaintAtSize_ACK,
732 int /* tag */,
733 gfx::Size /* size */)
734
735 // Sent to update part of the view. In response to this message, the host
736 // generates a ViewMsg_UpdateRect_ACK message.
737 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateRect,
738 ViewHostMsg_UpdateRect_Params)
739
740 // Sent by the renderer when accelerated compositing is enabled or disabled to
741 // notify the browser whether or not is should do painting.
742 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidActivateAcceleratedCompositing,
743 bool /* true if the accelerated compositor is actve */)
744
745 // Acknowledges receipt of a ViewMsg_HandleInputEvent message.
746 // Payload is a WebInputEvent::Type which is the type of the event, followed
747 // by an optional WebInputEvent which is provided only if the event was not
748 // processed.
749 IPC_MESSAGE_ROUTED0(ViewHostMsg_HandleInputEvent_ACK)
750
751 IPC_MESSAGE_ROUTED0(ViewHostMsg_Focus)
752 IPC_MESSAGE_ROUTED0(ViewHostMsg_Blur)
753
754 // Message sent from renderer to the browser when focus changes inside the
755 // webpage. The parameter says whether the newly focused element needs
756 // keyboard input (true for textfields, text areas and content editable divs).
757 IPC_MESSAGE_ROUTED1(ViewHostMsg_FocusedNodeChanged,
758 bool /* is_editable_node */)
759
760 // Returns the window location of the given window.
761 // TODO(shess): Provide a mapping from reply_msg->routing_id() to
762 // HWND so that we can eliminate the NativeViewId parameter.
763 IPC_SYNC_MESSAGE_ROUTED1_1(ViewHostMsg_GetWindowRect,
764 gfx::NativeViewId /* window */,
765 gfx::Rect /* Out: Window location */)
766
767 IPC_MESSAGE_ROUTED1(ViewHostMsg_SetCursor, WebCursor)
768
769 // Used to set a cookie. The cookie is set asynchronously, but will be
770 // available to a subsequent ViewHostMsg_GetCookies request.
771 IPC_MESSAGE_ROUTED3(ViewHostMsg_SetCookie,
772 GURL /* url */,
773 GURL /* first_party_for_cookies */,
774 std::string /* cookie */)
775
776 // Used to get cookies for the given URL. This may block waiting for a
777 // previous SetCookie message to be processed.
778 IPC_SYNC_MESSAGE_ROUTED2_1(ViewHostMsg_GetCookies,
779 GURL /* url */,
780 GURL /* first_party_for_cookies */,
781 std::string /* cookies */)
782
783 // Used to get raw cookie information for the given URL. This may block
784 // waiting for a previous SetCookie message to be processed.
785 IPC_SYNC_MESSAGE_ROUTED2_1(ViewHostMsg_GetRawCookies,
786 GURL /* url */,
787 GURL /* first_party_for_cookies */,
788 std::vector<webkit_glue::WebCookie>
789 /* raw_cookies */)
790
791 // Used to delete cookie for the given URL and name
792 IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_DeleteCookie,
793 GURL /* url */,
794 std::string /* cookie_name */)
795
796 // Used to check if cookies are enabled for the given URL. This may block
797 // waiting for a previous SetCookie message to be processed.
798 IPC_SYNC_MESSAGE_ROUTED2_1(ViewHostMsg_CookiesEnabled,
799 GURL /* url */,
800 GURL /* first_party_for_cookies */,
801 bool /* cookies_enabled */)
802
803 // Used to get the list of plugins
804 IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_GetPlugins,
805 bool /* refresh*/,
806 std::vector<webkit::npapi::WebPluginInfo> /* plugins */)
807
808 // Return information about a plugin for the given URL and MIME
809 // type. If there is no matching plugin, |found| is false. If
810 // |enabled| in the WebPluginInfo struct is false, the plug-in is
811 // treated as if it was not installed at all.
812 //
813 // If |setting| is set to CONTENT_SETTING_BLOCK, the plug-in is
814 // blocked by the content settings for |policy_url|. It still
815 // appears in navigator.plugins in Javascript though, and can be
816 // loaded via click-to-play.
817 //
818 // If |setting| is set to CONTENT_SETTING_ALLOW, the domain is
819 // explicitly white-listed for the plug-in, or the user has chosen
820 // not to block nonsandboxed plugins.
821 //
822 // If |setting| is set to CONTENT_SETTING_DEFAULT, the plug-in is
823 // neither blocked nor white-listed, which means that it's allowed
824 // by default and can still be blocked if it's non-sandboxed.
825 //
826 // |actual_mime_type| is the actual mime type supported by the
827 // plugin found that match the URL given (one for each item in
828 // |info|).
829 IPC_SYNC_MESSAGE_CONTROL4_4(ViewHostMsg_GetPluginInfo,
830 int /* routing_id */,
831 GURL /* url */,
832 GURL /* policy_url */,
833 std::string /* mime_type */,
834 bool /* found */,
835 webkit::npapi::WebPluginInfo /* plugin info */,
836 ContentSetting /* setting */,
837 std::string /* actual_mime_type */)
838
839 // Requests spellcheck for a word. 511 // Requests spellcheck for a word.
840 IPC_SYNC_MESSAGE_ROUTED2_2(ViewHostMsg_SpellCheck, 512 IPC_SYNC_MESSAGE_ROUTED2_2(ViewHostMsg_SpellCheck,
841 string16 /* word to check */, 513 string16 /* word to check */,
842 int /* document tag*/, 514 int /* document tag*/,
843 int /* misspell location */, 515 int /* misspell location */,
844 int /* misspell length */) 516 int /* misspell length */)
845 517
846 // Asks the browser for a unique document tag. 518 // Asks the browser for a unique document tag.
847 IPC_SYNC_MESSAGE_ROUTED0_1(ViewHostMsg_GetDocumentTag, 519 IPC_SYNC_MESSAGE_ROUTED0_1(ViewHostMsg_GetDocumentTag,
848 int /* the tag */) 520 int /* the tag */)
849 521
850
851 // This message tells the spellchecker that a document, identified by an int 522 // This message tells the spellchecker that a document, identified by an int
852 // tag, has been closed and all of the ignored words for that document can be 523 // tag, has been closed and all of the ignored words for that document can be
853 // forgotten. 524 // forgotten.
854 IPC_MESSAGE_ROUTED1(ViewHostMsg_DocumentWithTagClosed, 525 IPC_MESSAGE_ROUTED1(ViewHostMsg_DocumentWithTagClosed,
855 int /* the tag */) 526 int /* the tag */)
856 527
857 // Tells the browser to display or not display the SpellingPanel 528 // Tells the browser to display or not display the SpellingPanel
858 IPC_MESSAGE_ROUTED1(ViewHostMsg_ShowSpellingPanel, 529 IPC_MESSAGE_ROUTED1(ViewHostMsg_ShowSpellingPanel,
859 bool /* if true, then show it, otherwise hide it*/) 530 bool /* if true, then show it, otherwise hide it*/)
860 531
861 // Tells the browser to update the spelling panel with the given word. 532 // Tells the browser to update the spelling panel with the given word.
862 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateSpellingPanelWithMisspelledWord, 533 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateSpellingPanelWithMisspelledWord,
863 string16 /* the word to update the panel with */) 534 string16 /* the word to update the panel with */)
864 535
865 // Tells the browser that content in the current page was blocked due to the 536 // Tells the browser that content in the current page was blocked due to the
866 // user's content settings. 537 // user's content settings.
867 IPC_MESSAGE_ROUTED2(ViewHostMsg_ContentBlocked, 538 IPC_MESSAGE_ROUTED2(ViewHostMsg_ContentBlocked,
868 ContentSettingsType, /* type of blocked content */ 539 ContentSettingsType, /* type of blocked content */
869 std::string /* resource identifier */) 540 std::string /* resource identifier */)
870 541
871 // Tells the browser that a specific Appcache manifest in the current page
872 // was accessed.
873 IPC_MESSAGE_ROUTED2(ViewHostMsg_AppCacheAccessed,
874 GURL /* manifest url */,
875 bool /* blocked by policy */)
876
877 // Tells the browser that a specific Web database in the current page was
878 // accessed.
879 IPC_MESSAGE_ROUTED5(ViewHostMsg_WebDatabaseAccessed,
880 GURL /* origin url */,
881 string16 /* database name */,
882 string16 /* database display name */,
883 unsigned long /* estimated size */,
884 bool /* blocked by policy */)
885
886 // Initiates a download based on user actions like 'ALT+click'.
887 IPC_MESSAGE_ROUTED2(ViewHostMsg_DownloadUrl,
888 GURL /* url */,
889 GURL /* referrer */)
890
891 // Used to go to the session history entry at the given offset (ie, -1 will
892 // return the "back" item).
893 IPC_MESSAGE_ROUTED1(ViewHostMsg_GoToEntryAtOffset,
894 int /* offset (from current) of history item to get */)
895
896 IPC_SYNC_MESSAGE_ROUTED4_2(ViewHostMsg_RunJavaScriptMessage,
897 std::wstring /* in - alert message */,
898 std::wstring /* in - default prompt */,
899 GURL /* in - originating page URL */,
900 int /* in - dialog flags */,
901 bool /* out - success */,
902 std::wstring /* out - prompt field */)
903
904 // Provides the contents for the given page that was loaded recently.
905 IPC_MESSAGE_ROUTED5(ViewHostMsg_PageContents,
906 GURL /* URL of the page */,
907 int32 /* page id */,
908 string16 /* page contents */,
909 std::string /* page ISO639_1 language code */,
910 bool /* whether the page can be translated */)
911
912 // Used to get the extension message bundle. 542 // Used to get the extension message bundle.
913 IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_GetExtensionMessageBundle, 543 IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_GetExtensionMessageBundle,
914 std::string /* extension id */, 544 std::string /* extension id */,
915 SubstitutionMap /* message bundle */) 545 SubstitutionMap /* message bundle */)
916 546
917 // Specifies the URL as the first parameter (a wstring) and thumbnail as 547 // Specifies the URL as the first parameter (a wstring) and thumbnail as
918 // binary data as the second parameter. 548 // binary data as the second parameter.
919 IPC_MESSAGE_ROUTED3(ViewHostMsg_Thumbnail, 549 IPC_MESSAGE_ROUTED3(ViewHostMsg_Thumbnail,
920 GURL /* url */, 550 GURL /* url */,
921 ThumbnailScore /* score */, 551 ThumbnailScore /* score */,
922 SkBitmap /* bitmap */) 552 SkBitmap /* bitmap */)
923 553
924 // Send a snapshot of the tab contents to the render host. 554 // Send a snapshot of the tab contents to the render host.
925 IPC_MESSAGE_ROUTED1(ViewHostMsg_Snapshot, 555 IPC_MESSAGE_ROUTED1(ViewHostMsg_Snapshot,
926 SkBitmap /* bitmap */) 556 SkBitmap /* bitmap */)
927 557
928 // Notification that the url for the favicon of a site has been determined. 558 // Notification that the url for the favicon of a site has been determined.
929 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateFaviconURL, 559 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateFaviconURL,
930 int32 /* page_id */, 560 int32 /* page_id */,
931 GURL /* url of the favicon */) 561 GURL /* url of the favicon */)
932 562
933 // Requests that the given URL be opened in the specified manner.
934 IPC_MESSAGE_ROUTED3(ViewHostMsg_OpenURL,
935 GURL /* url */,
936 GURL /* referrer */,
937 WindowOpenDisposition /* disposition */)
938
939 // Notifies that the preferred size of the content changed.
940 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidContentsPreferredSizeChange,
941 gfx::Size /* pref_size */)
942
943 // Following message is used to communicate the values received by the 563 // Following message is used to communicate the values received by the
944 // callback binding the JS to Cpp. 564 // callback binding the JS to Cpp.
945 // An instance of browser that has an automation host listening to it can 565 // An instance of browser that has an automation host listening to it can
946 // have a javascript send a native value (string, number, boolean) to the 566 // have a javascript send a native value (string, number, boolean) to the
947 // listener in Cpp. (DomAutomationController) 567 // listener in Cpp. (DomAutomationController)
948 IPC_MESSAGE_ROUTED2(ViewHostMsg_DomOperationResponse, 568 IPC_MESSAGE_ROUTED2(ViewHostMsg_DomOperationResponse,
949 std::string /* json_string */, 569 std::string /* json_string */,
950 int /* automation_id */) 570 int /* automation_id */)
951 571
952 // A message from HTML-based UI. When (trusted) Javascript calls
953 // send(message, args), this message is sent to the browser.
954 IPC_MESSAGE_ROUTED3(ViewHostMsg_WebUISend,
955 GURL /* source_url */,
956 std::string /* message */,
957 std::string /* args (as a JSON string) */)
958
959 // A message for an external host. 572 // A message for an external host.
960 IPC_MESSAGE_ROUTED3(ViewHostMsg_ForwardMessageToExternalHost, 573 IPC_MESSAGE_ROUTED3(ViewHostMsg_ForwardMessageToExternalHost,
961 std::string /* message */, 574 std::string /* message */,
962 std::string /* origin */, 575 std::string /* origin */,
963 std::string /* target */) 576 std::string /* target */)
964 577
965 // A renderer sends this to the browser process when it wants to
966 // create a plugin. The browser will create the plugin process if
967 // necessary, and will return a handle to the channel on success.
968 // On error an empty string is returned.
969 IPC_SYNC_MESSAGE_CONTROL3_2(ViewHostMsg_OpenChannelToPlugin,
970 int /* routing_id */,
971 GURL /* url */,
972 std::string /* mime_type */,
973 IPC::ChannelHandle /* channel_handle */,
974 webkit::npapi::WebPluginInfo /* info */)
975
976 // A renderer sends this to the browser process when it wants to
977 // create a pepper plugin. The browser will create the plugin process if
978 // necessary, and will return a handle to the channel on success.
979 // On error an empty string is returned.
980 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_OpenChannelToPepperPlugin,
981 FilePath /* path */,
982 base::ProcessHandle /* plugin_process_handle */,
983 IPC::ChannelHandle /* handle to channel */)
984
985 // A renderer sends this to the browser process when it wants to start 578 // A renderer sends this to the browser process when it wants to start
986 // a new instance of the Native Client process. The browser will launch 579 // a new instance of the Native Client process. The browser will launch
987 // the process and return a handle to an IMC channel. 580 // the process and return a handle to an IMC channel.
988 IPC_SYNC_MESSAGE_CONTROL2_3(ViewHostMsg_LaunchNaCl, 581 IPC_SYNC_MESSAGE_CONTROL2_3(ViewHostMsg_LaunchNaCl,
989 std::wstring /* url for the NaCl module */, 582 std::wstring /* url for the NaCl module */,
990 int /* socket count */, 583 int /* socket count */,
991 std::vector<nacl::FileDescriptor> 584 std::vector<nacl::FileDescriptor>
992 /* imc channel handles */, 585 /* imc channel handles */,
993 base::ProcessHandle /* NaCl process handle */, 586 base::ProcessHandle /* NaCl process handle */,
994 base::ProcessId /* NaCl process id */) 587 base::ProcessId /* NaCl process id */)
995 588
996 #if defined(USE_X11)
997 // A renderer sends this when it needs a browser-side widget for
998 // hosting a windowed plugin. id is the XID of the plugin window, for which
999 // the container is created.
1000 IPC_SYNC_MESSAGE_ROUTED1_0(ViewHostMsg_CreatePluginContainer,
1001 gfx::PluginWindowHandle /* id */)
1002
1003 // Destroy a plugin container previously created using CreatePluginContainer.
1004 // id is the XID of the plugin window corresponding to the container that is
1005 // to be destroyed.
1006 IPC_SYNC_MESSAGE_ROUTED1_0(ViewHostMsg_DestroyPluginContainer,
1007 gfx::PluginWindowHandle /* id */)
1008 #endif
1009
1010 #if defined(OS_MACOSX)
1011 // Request that the browser load a font into shared memory for us.
1012 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_LoadFont,
1013 FontDescriptor /* font to load */,
1014 uint32 /* buffer size */,
1015 base::SharedMemoryHandle /* font data */)
1016 #endif
1017
1018 #if defined(OS_WIN)
1019 // Request that the given font be loaded by the browser so it's cached by the
1020 // OS. Please see ChildProcessHost::PreCacheFont for details.
1021 IPC_SYNC_MESSAGE_CONTROL1_0(ViewHostMsg_PreCacheFont,
1022 LOGFONT /* font data */)
1023 #endif // defined(OS_WIN)
1024
1025 // Returns WebScreenInfo corresponding to the view.
1026 // TODO(shess): Provide a mapping from reply_msg->routing_id() to
1027 // HWND so that we can eliminate the NativeViewId parameter.
1028 IPC_SYNC_MESSAGE_ROUTED1_1(ViewHostMsg_GetScreenInfo,
1029 gfx::NativeViewId /* view */,
1030 WebKit::WebScreenInfo /* results */)
1031
1032 // Send the tooltip text for the current mouse position to the browser.
1033 IPC_MESSAGE_ROUTED2(ViewHostMsg_SetTooltipText,
1034 std::wstring /* tooltip text string */,
1035 WebKit::WebTextDirection /* text direction hint */)
1036
1037 // Notification that the text selection has changed.
1038 IPC_MESSAGE_ROUTED1(ViewHostMsg_SelectionChanged,
1039 std::string /* currently selected text */)
1040
1041 // Asks the browser to display the file chooser. The result is returned in a
1042 // ViewHost_RunFileChooserResponse message.
1043 IPC_MESSAGE_ROUTED1(ViewHostMsg_RunFileChooser,
1044 ViewHostMsg_RunFileChooser_Params)
1045
1046 // Tells the browser to move the focus to the next (previous if reverse is
1047 // true) focusable element.
1048 IPC_MESSAGE_ROUTED1(ViewHostMsg_TakeFocus, bool /* reverse */)
1049
1050 // Notification that the page has an OpenSearch description document 589 // Notification that the page has an OpenSearch description document
1051 // associated with it. 590 // associated with it.
1052 IPC_MESSAGE_ROUTED3(ViewHostMsg_PageHasOSDD, 591 IPC_MESSAGE_ROUTED3(ViewHostMsg_PageHasOSDD,
1053 int32 /* page_id */, 592 int32 /* page_id */,
1054 GURL /* url of OS description document */, 593 GURL /* url of OS description document */,
1055 ViewHostMsg_PageHasOSDD_Type) 594 ViewHostMsg_PageHasOSDD_Type)
1056 595
1057 // Find out if the given url's security origin is installed as a search 596 // Find out if the given url's security origin is installed as a search
1058 // provider. 597 // provider.
1059 IPC_SYNC_MESSAGE_ROUTED2_1( 598 IPC_SYNC_MESSAGE_ROUTED2_1(
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
1274 // Provide the browser process with information about the WebCore resource 813 // Provide the browser process with information about the WebCore resource
1275 // cache. 814 // cache.
1276 IPC_MESSAGE_CONTROL1(ViewHostMsg_ResourceTypeStats, 815 IPC_MESSAGE_CONTROL1(ViewHostMsg_ResourceTypeStats,
1277 WebKit::WebCache::ResourceTypeStats) 816 WebKit::WebCache::ResourceTypeStats)
1278 817
1279 // Notify the browser that this render process can or can't be suddenly 818 // Notify the browser that this render process can or can't be suddenly
1280 // terminated. 819 // terminated.
1281 IPC_MESSAGE_CONTROL1(ViewHostMsg_SuddenTerminationChanged, 820 IPC_MESSAGE_CONTROL1(ViewHostMsg_SuddenTerminationChanged,
1282 bool /* enabled */) 821 bool /* enabled */)
1283 822
1284 // Returns the window location of the window this widget is embeded.
1285 // TODO(shess): Provide a mapping from reply_msg->routing_id() to
1286 // HWND so that we can eliminate the NativeViewId parameter.
1287 IPC_SYNC_MESSAGE_ROUTED1_1(ViewHostMsg_GetRootWindowRect,
1288 gfx::NativeViewId /* window */,
1289 gfx::Rect /* Out: Window location */)
1290
1291 // A renderer sends this message when an extension process starts an API 823 // A renderer sends this message when an extension process starts an API
1292 // request. The browser will always respond with a ViewMsg_ExtensionResponse. 824 // request. The browser will always respond with a ViewMsg_ExtensionResponse.
1293 IPC_MESSAGE_ROUTED1(ViewHostMsg_ExtensionRequest, 825 IPC_MESSAGE_ROUTED1(ViewHostMsg_ExtensionRequest,
1294 ViewHostMsg_DomMessage_Params) 826 ViewHostMsg_DomMessage_Params)
1295 827
1296 // Notify the browser that the given extension added a listener to an event. 828 // Notify the browser that the given extension added a listener to an event.
1297 IPC_MESSAGE_CONTROL2(ViewHostMsg_ExtensionAddListener, 829 IPC_MESSAGE_CONTROL2(ViewHostMsg_ExtensionAddListener,
1298 std::string /* extension_id */, 830 std::string /* extension_id */,
1299 std::string /* name */) 831 std::string /* name */)
1300 832
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
1561 // Register a new handler for URL requests with the given scheme. 1093 // Register a new handler for URL requests with the given scheme.
1562 IPC_MESSAGE_ROUTED3(ViewHostMsg_RegisterProtocolHandler, 1094 IPC_MESSAGE_ROUTED3(ViewHostMsg_RegisterProtocolHandler,
1563 std::string /* scheme */, 1095 std::string /* scheme */,
1564 GURL /* url */, 1096 GURL /* url */,
1565 string16 /* title */) 1097 string16 /* title */)
1566 1098
1567 // Send from the renderer to the browser to return the script running result. 1099 // Send from the renderer to the browser to return the script running result.
1568 IPC_MESSAGE_ROUTED2(ViewHostMsg_ExecuteCodeFinished, 1100 IPC_MESSAGE_ROUTED2(ViewHostMsg_ExecuteCodeFinished,
1569 int, /* request id */ 1101 int, /* request id */
1570 bool /* whether the script ran successfully */) 1102 bool /* whether the script ran successfully */)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698