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

Side by Side Diff: content/renderer/render_view_impl.h

Issue 8760024: Cross-process postMessage (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: New patch, still not quite done Created 9 years 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
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 #ifndef CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ 5 #ifndef CONTENT_RENDERER_RENDER_VIEW_IMPL_H_
6 #define CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ 6 #define CONTENT_RENDERER_RENDER_VIEW_IMPL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <deque> 9 #include <deque>
10 #include <map> 10 #include <map>
(...skipping 23 matching lines...) Expand all
34 #include "content/renderer/pepper_plugin_delegate_impl.h" 34 #include "content/renderer/pepper_plugin_delegate_impl.h"
35 #include "content/renderer/render_widget.h" 35 #include "content/renderer/render_widget.h"
36 #include "ipc/ipc_platform_file.h" 36 #include "ipc/ipc_platform_file.h"
37 #include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h" 37 #include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h"
38 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebFileSyste m.h" 38 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebFileSyste m.h"
39 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrameClient.h" 39 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrameClient.h"
40 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIconURL.h" 40 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIconURL.h"
41 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNode.h" 41 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNode.h"
42 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPageSerializerClie nt.h" 42 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPageSerializerClie nt.h"
43 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPageVisibilityStat e.h" 43 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPageVisibilityStat e.h"
44 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h"
44 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h" 45 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h"
45 #include "third_party/WebKit/Source/WebKit/chromium/public/WebViewClient.h" 46 #include "third_party/WebKit/Source/WebKit/chromium/public/WebViewClient.h"
46 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNavigationType.h" 47 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNavigationType.h"
47 #include "ui/base/javascript_message_type.h" 48 #include "ui/base/javascript_message_type.h"
48 #include "ui/gfx/surface/transport_dib.h" 49 #include "ui/gfx/surface/transport_dib.h"
49 #include "webkit/glue/webpreferences.h" 50 #include "webkit/glue/webpreferences.h"
50 #include "webkit/media/webmediaplayer_delegate.h" 51 #include "webkit/media/webmediaplayer_delegate.h"
51 #include "webkit/plugins/npapi/webplugin_page_delegate.h" 52 #include "webkit/plugins/npapi/webplugin_page_delegate.h"
52 53
53 #if defined(OS_WIN) 54 #if defined(OS_WIN)
(...skipping 13 matching lines...) Expand all
67 class LoadProgressTracker; 68 class LoadProgressTracker;
68 class MediaStreamImpl; 69 class MediaStreamImpl;
69 class NotificationProvider; 70 class NotificationProvider;
70 class PepperDeviceTest; 71 class PepperDeviceTest;
71 struct PP_NetAddress_Private; 72 struct PP_NetAddress_Private;
72 class RenderWidgetFullscreenPepper; 73 class RenderWidgetFullscreenPepper;
73 class RendererAccessibility; 74 class RendererAccessibility;
74 class SkBitmap; 75 class SkBitmap;
75 class SpeechInputDispatcher; 76 class SpeechInputDispatcher;
76 struct ViewMsg_Navigate_Params; 77 struct ViewMsg_Navigate_Params;
78 struct ViewMsg_PostMessage_Params;
79 struct ViewMsg_SetOpenerProxy_Params;
77 struct ViewMsg_StopFinding_Params; 80 struct ViewMsg_StopFinding_Params;
78 struct ViewMsg_SwapOut_Params; 81 struct ViewMsg_SwapOut_Params;
79 struct WebDropData; 82 struct WebDropData;
80 class WebPluginDelegateProxy; 83 class WebPluginDelegateProxy;
81 class WebUIBindings; 84 class WebUIBindings;
82 85
83 namespace content { 86 namespace content {
84 class DocumentState; 87 class DocumentState;
85 class P2PSocketDispatcher; 88 class P2PSocketDispatcher;
86 class RenderViewObserver; 89 class RenderViewObserver;
(...skipping 16 matching lines...) Expand all
103 106
104 namespace webkit_glue { 107 namespace webkit_glue {
105 struct CustomContextMenuContext; 108 struct CustomContextMenuContext;
106 class ImageResourceFetcher; 109 class ImageResourceFetcher;
107 class ResourceFetcher; 110 class ResourceFetcher;
108 } 111 }
109 112
110 namespace WebKit { 113 namespace WebKit {
111 class WebApplicationCacheHost; 114 class WebApplicationCacheHost;
112 class WebApplicationCacheHostClient; 115 class WebApplicationCacheHostClient;
116 class WebDOMMessageEvent;
113 class WebDataSource; 117 class WebDataSource;
114 class WebDragData; 118 class WebDragData;
115 class WebGeolocationClient; 119 class WebGeolocationClient;
116 class WebIconURL; 120 class WebIconURL;
117 class WebImage; 121 class WebImage;
118 class WebMediaPlayer; 122 class WebMediaPlayer;
119 class WebMediaPlayerClient; 123 class WebMediaPlayerClient;
120 class WebMouseEvent; 124 class WebMouseEvent;
121 class WebSpeechInputController; 125 class WebSpeechInputController;
122 class WebSpeechInputListener; 126 class WebSpeechInputListener;
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 WebKit::WebStorageQuotaType type, 535 WebKit::WebStorageQuotaType type,
532 unsigned long long requested_size, 536 unsigned long long requested_size,
533 WebKit::WebStorageQuotaCallbacks* callbacks); 537 WebKit::WebStorageQuotaCallbacks* callbacks);
534 538
535 virtual void registerIntentService( 539 virtual void registerIntentService(
536 WebKit::WebFrame* frame, 540 WebKit::WebFrame* frame,
537 const WebKit::WebIntentServiceInfo& service); 541 const WebKit::WebIntentServiceInfo& service);
538 virtual void dispatchIntent(WebKit::WebFrame* frame, 542 virtual void dispatchIntent(WebKit::WebFrame* frame,
539 const WebKit::WebIntent& intent); 543 const WebKit::WebIntent& intent);
540 544
545 virtual bool interceptPostMessage(int64 source_frame_id,
546 WebKit::WebSecurityOrigin targetOrigin,
547 WebKit::WebDOMMessageEvent event);
548
541 // WebKit::WebPageSerializerClient implementation ---------------------------- 549 // WebKit::WebPageSerializerClient implementation ----------------------------
542 550
543 virtual void didSerializeDataForFrame( 551 virtual void didSerializeDataForFrame(
544 const WebKit::WebURL& frame_url, 552 const WebKit::WebURL& frame_url,
545 const WebKit::WebCString& data, 553 const WebKit::WebCString& data,
546 PageSerializationStatus status) OVERRIDE; 554 PageSerializationStatus status) OVERRIDE;
547 555
548 // content::RenderView implementation ---------------------------------------- 556 // content::RenderView implementation ----------------------------------------
549 557
550 virtual bool Send(IPC::Message* message) OVERRIDE; 558 virtual bool Send(IPC::Message* message) OVERRIDE;
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 void OnMediaPlayerActionAt(const gfx::Point& location, 807 void OnMediaPlayerActionAt(const gfx::Point& location,
800 const WebKit::WebMediaPlayerAction& action); 808 const WebKit::WebMediaPlayerAction& action);
801 void OnMouseLockLost(); 809 void OnMouseLockLost();
802 void OnMoveOrResizeStarted(); 810 void OnMoveOrResizeStarted();
803 CONTENT_EXPORT void OnNavigate(const ViewMsg_Navigate_Params& params); 811 CONTENT_EXPORT void OnNavigate(const ViewMsg_Navigate_Params& params);
804 void OnPaste(); 812 void OnPaste();
805 void OnPasteAndMatchStyle(); 813 void OnPasteAndMatchStyle();
806 #if defined(OS_MACOSX) 814 #if defined(OS_MACOSX)
807 void OnPluginImeCompositionCompleted(const string16& text, int plugin_id); 815 void OnPluginImeCompositionCompleted(const string16& text, int plugin_id);
808 #endif 816 #endif
817 void OnPostMessage(int64 frame_id, const ViewMsg_PostMessage_Params& params);
809 void OnRedo(); 818 void OnRedo();
810 void OnReloadFrame(); 819 void OnReloadFrame();
811 void OnReplace(const string16& text); 820 void OnReplace(const string16& text);
812 void OnReservePageIDRange(int size_of_range); 821 void OnReservePageIDRange(int size_of_range);
813 void OnResetPageEncodingToDefault(); 822 void OnResetPageEncodingToDefault();
814 void OnScriptEvalRequest(const string16& frame_xpath, 823 void OnScriptEvalRequest(const string16& frame_xpath,
815 const string16& jscript, 824 const string16& jscript,
816 int id, 825 int id,
817 bool notify_result); 826 bool notify_result);
818 void OnSelectAll(); 827 void OnSelectAll();
819 void OnSelectRange(const gfx::Point& start, const gfx::Point& end); 828 void OnSelectRange(const gfx::Point& start, const gfx::Point& end);
820 void OnSetActive(bool active); 829 void OnSetActive(bool active);
821 void OnSetAltErrorPageURL(const GURL& gurl); 830 void OnSetAltErrorPageURL(const GURL& gurl);
822 void OnSetBackground(const SkBitmap& background); 831 void OnSetBackground(const SkBitmap& background);
823 void OnSetWebUIProperty(const std::string& name, const std::string& value); 832 void OnSetWebUIProperty(const std::string& name, const std::string& value);
824 void OnSetEditCommandsForNextKeyEvent(const EditCommands& edit_commands); 833 void OnSetEditCommandsForNextKeyEvent(const EditCommands& edit_commands);
825 CONTENT_EXPORT void OnSetHistoryLengthAndPrune(int history_length, 834 CONTENT_EXPORT void OnSetHistoryLengthAndPrune(int history_length,
826 int32 minimum_page_id); 835 int32 minimum_page_id);
827 void OnSetInitialFocus(bool reverse); 836 void OnSetInitialFocus(bool reverse);
828 #if defined(OS_MACOSX) 837 #if defined(OS_MACOSX)
829 void OnSetInLiveResize(bool in_live_resize); 838 void OnSetInLiveResize(bool in_live_resize);
830 #endif 839 #endif
831 void OnScrollFocusedEditableNodeIntoRect(const gfx::Rect& rect); 840 void OnScrollFocusedEditableNodeIntoRect(const gfx::Rect& rect);
841 void OnSetOpenerProxy(const ViewMsg_SetOpenerProxy_Params& params);
832 void OnSetPageEncoding(const std::string& encoding_name); 842 void OnSetPageEncoding(const std::string& encoding_name);
833 void OnSetRendererPrefs(const content::RendererPreferences& renderer_prefs); 843 void OnSetRendererPrefs(const content::RendererPreferences& renderer_prefs);
834 #if defined(OS_MACOSX) 844 #if defined(OS_MACOSX)
835 void OnSetWindowVisibility(bool visible); 845 void OnSetWindowVisibility(bool visible);
836 #endif 846 #endif
837 void OnSetZoomLevel(double zoom_level); 847 void OnSetZoomLevel(double zoom_level);
838 void OnSetZoomLevelForLoadingURL(const GURL& url, double zoom_level); 848 void OnSetZoomLevelForLoadingURL(const GURL& url, double zoom_level);
839 void OnExitFullscreen(); 849 void OnExitFullscreen();
840 void OnShouldClose(); 850 void OnShouldClose();
841 void OnStop(); 851 void OnStop();
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
904 // Returns true if the |params| navigation is to an entry that has been 914 // Returns true if the |params| navigation is to an entry that has been
905 // cropped due to a recent navigation the browser did not know about. 915 // cropped due to a recent navigation the browser did not know about.
906 bool IsBackForwardToStaleEntry(const ViewMsg_Navigate_Params& params, 916 bool IsBackForwardToStaleEntry(const ViewMsg_Navigate_Params& params,
907 bool is_reload); 917 bool is_reload);
908 918
909 // Returns false unless this is a top-level navigation that crosses origins. 919 // Returns false unless this is a top-level navigation that crosses origins.
910 bool IsNonLocalTopLevelNavigation(const GURL& url, 920 bool IsNonLocalTopLevelNavigation(const GURL& url,
911 WebKit::WebFrame* frame, 921 WebKit::WebFrame* frame,
912 WebKit::WebNavigationType type); 922 WebKit::WebNavigationType type);
913 923
924 void InstallDOMProxy(WebKit::WebFrame *frame,
925 int64 browsing_instance_frame_id);
926
914 bool MaybeLoadAlternateErrorPage(WebKit::WebFrame* frame, 927 bool MaybeLoadAlternateErrorPage(WebKit::WebFrame* frame,
915 const WebKit::WebURLError& error, 928 const WebKit::WebURLError& error,
916 bool replace); 929 bool replace);
917 930
918 // If we initiated a navigation, this function will populate |document_state| 931 // If we initiated a navigation, this function will populate |document_state|
919 // with the navigation information saved in OnNavigate(). 932 // with the navigation information saved in OnNavigate().
920 void PopulateStateFromPendingNavigationParams( 933 void PopulateStateFromPendingNavigationParams(
921 content::DocumentState* document_state); 934 content::DocumentState* document_state);
922 935
923 // Starts nav_state_sync_timer_ if it isn't already running. 936 // Starts nav_state_sync_timer_ if it isn't already running.
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
1198 scoped_ptr<LoadProgressTracker> load_progress_tracker_; 1211 scoped_ptr<LoadProgressTracker> load_progress_tracker_;
1199 1212
1200 // All the registered observers. We expect this list to be small, so vector 1213 // All the registered observers. We expect this list to be small, so vector
1201 // is fine. 1214 // is fine.
1202 ObserverList<content::RenderViewObserver> observers_; 1215 ObserverList<content::RenderViewObserver> observers_;
1203 1216
1204 // Used to inform didChangeSelection() when it is called in the context 1217 // Used to inform didChangeSelection() when it is called in the context
1205 // of handling a ViewMsg_SelectRange IPC. 1218 // of handling a ViewMsg_SelectRange IPC.
1206 bool handling_select_range_; 1219 bool handling_select_range_;
1207 1220
1221 // The browsing instance frame id of the frame we're a proxy for, or
1222 // -1 if none.
1223 int64 proxy_of_browsing_instance_frame_id_;
Charlie Reis 2011/12/12 22:20:36 This seems a bit confusing to me, partly because o
supersat 2011/12/15 19:30:49 Done. Yes.
1224
1208 // Plugins ------------------------------------------------------------------- 1225 // Plugins -------------------------------------------------------------------
1209 1226
1210 // All the currently active plugin delegates for this RenderView; kept so 1227 // All the currently active plugin delegates for this RenderView; kept so
1211 // that we can enumerate them to send updates about things like window 1228 // that we can enumerate them to send updates about things like window
1212 // location or tab focus and visibily. These are non-owning references. 1229 // location or tab focus and visibily. These are non-owning references.
1213 std::set<WebPluginDelegateProxy*> plugin_delegates_; 1230 std::set<WebPluginDelegateProxy*> plugin_delegates_;
1214 1231
1215 #if defined(OS_WIN) 1232 #if defined(OS_WIN)
1216 // The ID of the focused NPAPI plug-in. 1233 // The ID of the focused NPAPI plug-in.
1217 int focused_plugin_id_; 1234 int focused_plugin_id_;
1218 #endif 1235 #endif
1219 1236
1220 // NOTE: pepper_delegate_ should be last member because its constructor calls 1237 // NOTE: pepper_delegate_ should be last member because its constructor calls
1221 // AddObservers method of RenderViewImpl from c-tor. 1238 // AddObservers method of RenderViewImpl from c-tor.
1222 PepperPluginDelegateImpl pepper_delegate_; 1239 PepperPluginDelegateImpl pepper_delegate_;
1223 1240
1224 // --------------------------------------------------------------------------- 1241 // ---------------------------------------------------------------------------
1225 // ADDING NEW DATA? Please see if it fits appropriately in one of the above 1242 // ADDING NEW DATA? Please see if it fits appropriately in one of the above
1226 // sections rather than throwing it randomly at the end. If you're adding a 1243 // sections rather than throwing it randomly at the end. If you're adding a
1227 // bunch of stuff, you should probably create a helper class and put your 1244 // bunch of stuff, you should probably create a helper class and put your
1228 // data and methods on that to avoid bloating RenderView more. You can 1245 // data and methods on that to avoid bloating RenderView more. You can
1229 // use the Observer interface to filter IPC messages and receive frame change 1246 // use the Observer interface to filter IPC messages and receive frame change
1230 // notifications. 1247 // notifications.
1231 // --------------------------------------------------------------------------- 1248 // ---------------------------------------------------------------------------
1232 1249
1233 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); 1250 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl);
1234 }; 1251 };
1235 1252
1236 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ 1253 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698