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

Side by Side Diff: content/browser/web_contents/web_contents_impl.h

Issue 253013002: Pass RenderFrameHost to WebContentObservers' message handlers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 struct ViewHostMsg_DateTimeDialogValue_Params; 42 struct ViewHostMsg_DateTimeDialogValue_Params;
43 struct ViewMsg_PostMessage_Params; 43 struct ViewMsg_PostMessage_Params;
44 44
45 namespace content { 45 namespace content {
46 class BrowserPluginEmbedder; 46 class BrowserPluginEmbedder;
47 class BrowserPluginGuest; 47 class BrowserPluginGuest;
48 class BrowserPluginGuestManager; 48 class BrowserPluginGuestManager;
49 class DateTimeChooserAndroid; 49 class DateTimeChooserAndroid;
50 class DownloadItem; 50 class DownloadItem;
51 class InterstitialPageImpl; 51 class InterstitialPageImpl;
52 class JavaBridgeDispatcherHostManager;
53 class JavaScriptDialogManager; 52 class JavaScriptDialogManager;
54 class PowerSaveBlocker; 53 class PowerSaveBlocker;
55 class RenderViewHost; 54 class RenderViewHost;
56 class RenderViewHostDelegateView; 55 class RenderViewHostDelegateView;
57 class RenderViewHostImpl; 56 class RenderViewHostImpl;
58 class RenderWidgetHostImpl; 57 class RenderWidgetHostImpl;
59 class RenderWidgetHostViewPort; 58 class RenderWidgetHostViewPort;
60 class SavePackage; 59 class SavePackage;
61 class SessionStorageNamespaceImpl; 60 class SessionStorageNamespaceImpl;
62 class SiteInstance; 61 class SiteInstance;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 int CreateSwappedOutRenderView(SiteInstance* instance); 113 int CreateSwappedOutRenderView(SiteInstance* instance);
115 114
116 // Complex initialization here. Specifically needed to avoid having 115 // Complex initialization here. Specifically needed to avoid having
117 // members call back into our virtual functions in the constructor. 116 // members call back into our virtual functions in the constructor.
118 virtual void Init(const WebContents::CreateParams& params); 117 virtual void Init(const WebContents::CreateParams& params);
119 118
120 // Returns the SavePackage which manages the page saving job. May be NULL. 119 // Returns the SavePackage which manages the page saving job. May be NULL.
121 SavePackage* save_package() const { return save_package_.get(); } 120 SavePackage* save_package() const { return save_package_.get(); }
122 121
123 #if defined(OS_ANDROID) 122 #if defined(OS_ANDROID)
124 JavaBridgeDispatcherHostManager* java_bridge_dispatcher_host_manager() const {
125 return java_bridge_dispatcher_host_manager_.get();
126 }
127
128 // In Android WebView, the RenderView needs created even there is no 123 // In Android WebView, the RenderView needs created even there is no
129 // navigation entry, this allows Android WebViews to use 124 // navigation entry, this allows Android WebViews to use
130 // javascript: URLs that load into the DOMWindow before the first page 125 // javascript: URLs that load into the DOMWindow before the first page
131 // load. This is not safe to do in any context that a web page could get a 126 // load. This is not safe to do in any context that a web page could get a
132 // reference to the DOMWindow before the first page load. 127 // reference to the DOMWindow before the first page load.
133 bool CreateRenderViewForInitialEmptyDocument(); 128 bool CreateRenderViewForInitialEmptyDocument();
134 #endif 129 #endif
135 130
136 // Expose the render manager for testing. 131 // Expose the render manager for testing.
137 // TODO(creis): Remove this now that we can get to it via FrameTreeNode. 132 // TODO(creis): Remove this now that we can get to it via FrameTreeNode.
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 const gfx::Rect& selection_rect, 702 const gfx::Rect& selection_rect,
708 int active_match_ordinal, 703 int active_match_ordinal,
709 bool final_update); 704 bool final_update);
710 #if defined(OS_ANDROID) 705 #if defined(OS_ANDROID)
711 void OnFindMatchRectsReply(int version, 706 void OnFindMatchRectsReply(int version,
712 const std::vector<gfx::RectF>& rects, 707 const std::vector<gfx::RectF>& rects,
713 const gfx::RectF& active_rect); 708 const gfx::RectF& active_rect);
714 709
715 void OnOpenDateTimeDialog( 710 void OnOpenDateTimeDialog(
716 const ViewHostMsg_DateTimeDialogValue_Params& value); 711 const ViewHostMsg_DateTimeDialogValue_Params& value);
717 void OnJavaBridgeGetChannelHandle(IPC::Message* reply_msg);
718 #endif 712 #endif
719 void OnPepperPluginHung(int plugin_child_id, 713 void OnPepperPluginHung(int plugin_child_id,
720 const base::FilePath& path, 714 const base::FilePath& path,
721 bool is_hung); 715 bool is_hung);
722 void OnPluginCrashed(const base::FilePath& plugin_path, 716 void OnPluginCrashed(const base::FilePath& plugin_path,
723 base::ProcessId plugin_pid); 717 base::ProcessId plugin_pid);
724 void OnDomOperationResponse(const std::string& json_string, 718 void OnDomOperationResponse(const std::string& json_string,
725 int automation_id); 719 int automation_id);
726 void OnAppCacheAccessed(const GURL& manifest_url, bool blocked_by_policy); 720 void OnAppCacheAccessed(const GURL& manifest_url, bool blocked_by_policy);
727 void OnOpenColorChooser(int color_chooser_id, 721 void OnOpenColorChooser(int color_chooser_id,
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
910 // Maps the RenderViewHost to its media_player_cookie and PowerSaveBlocker 904 // Maps the RenderViewHost to its media_player_cookie and PowerSaveBlocker
911 // pairs. Key is the RenderViewHost, value is the map which maps player_cookie 905 // pairs. Key is the RenderViewHost, value is the map which maps player_cookie
912 // on to PowerSaveBlocker. 906 // on to PowerSaveBlocker.
913 typedef std::map<RenderViewHost*, std::map<int64, PowerSaveBlocker*> > 907 typedef std::map<RenderViewHost*, std::map<int64, PowerSaveBlocker*> >
914 PowerSaveBlockerMap; 908 PowerSaveBlockerMap;
915 PowerSaveBlockerMap power_save_blockers_; 909 PowerSaveBlockerMap power_save_blockers_;
916 910
917 // Manages the frame tree of the page and process swaps in each node. 911 // Manages the frame tree of the page and process swaps in each node.
918 FrameTree frame_tree_; 912 FrameTree frame_tree_;
919 913
920 #if defined(OS_ANDROID)
921 // Manages injecting Java objects into all RenderViewHosts associated with
922 // this WebContentsImpl.
923 scoped_ptr<JavaBridgeDispatcherHostManager>
924 java_bridge_dispatcher_host_manager_;
925 #endif
926
927 // SavePackage, lazily created. 914 // SavePackage, lazily created.
928 scoped_refptr<SavePackage> save_package_; 915 scoped_refptr<SavePackage> save_package_;
929 916
930 // Data for loading state ---------------------------------------------------- 917 // Data for loading state ----------------------------------------------------
931 918
932 // Indicates whether we're currently loading a resource. 919 // Indicates whether we're currently loading a resource.
933 bool is_loading_; 920 bool is_loading_;
934 921
935 // Indicates if the tab is considered crashed. 922 // Indicates if the tab is considered crashed.
936 base::TerminationStatus crashed_status_; 923 base::TerminationStatus crashed_status_;
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
1093 1080
1094 // Whether the last JavaScript dialog shown was suppressed. Used for testing. 1081 // Whether the last JavaScript dialog shown was suppressed. Used for testing.
1095 bool last_dialog_suppressed_; 1082 bool last_dialog_suppressed_;
1096 1083
1097 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); 1084 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl);
1098 }; 1085 };
1099 1086
1100 } // namespace content 1087 } // namespace content
1101 1088
1102 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 1089 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698