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

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

Issue 271863005: Revert 268939 "Pass RenderFrameHost to WebContentObservers' mess..." (Closed) Base URL: svn://svn.chromium.org/chrome/
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;
52 class JavaScriptDialogManager; 53 class JavaScriptDialogManager;
53 class PowerSaveBlocker; 54 class PowerSaveBlocker;
54 class RenderViewHost; 55 class RenderViewHost;
55 class RenderViewHostDelegateView; 56 class RenderViewHostDelegateView;
56 class RenderViewHostImpl; 57 class RenderViewHostImpl;
57 class RenderWidgetHostImpl; 58 class RenderWidgetHostImpl;
58 class SavePackage; 59 class SavePackage;
59 class SessionStorageNamespaceImpl; 60 class SessionStorageNamespaceImpl;
60 class SiteInstance; 61 class SiteInstance;
61 class TestWebContents; 62 class TestWebContents;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 int CreateSwappedOutRenderView(SiteInstance* instance); 113 int CreateSwappedOutRenderView(SiteInstance* instance);
113 114
114 // Complex initialization here. Specifically needed to avoid having 115 // Complex initialization here. Specifically needed to avoid having
115 // members call back into our virtual functions in the constructor. 116 // members call back into our virtual functions in the constructor.
116 virtual void Init(const WebContents::CreateParams& params); 117 virtual void Init(const WebContents::CreateParams& params);
117 118
118 // 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.
119 SavePackage* save_package() const { return save_package_.get(); } 120 SavePackage* save_package() const { return save_package_.get(); }
120 121
121 #if defined(OS_ANDROID) 122 #if defined(OS_ANDROID)
123 JavaBridgeDispatcherHostManager* java_bridge_dispatcher_host_manager() const {
124 return java_bridge_dispatcher_host_manager_.get();
125 }
126
122 // In Android WebView, the RenderView needs created even there is no 127 // In Android WebView, the RenderView needs created even there is no
123 // navigation entry, this allows Android WebViews to use 128 // navigation entry, this allows Android WebViews to use
124 // javascript: URLs that load into the DOMWindow before the first page 129 // javascript: URLs that load into the DOMWindow before the first page
125 // load. This is not safe to do in any context that a web page could get a 130 // load. This is not safe to do in any context that a web page could get a
126 // reference to the DOMWindow before the first page load. 131 // reference to the DOMWindow before the first page load.
127 bool CreateRenderViewForInitialEmptyDocument(); 132 bool CreateRenderViewForInitialEmptyDocument();
128 #endif 133 #endif
129 134
130 // Expose the render manager for testing. 135 // Expose the render manager for testing.
131 // TODO(creis): Remove this now that we can get to it via FrameTreeNode. 136 // TODO(creis): Remove this now that we can get to it via FrameTreeNode.
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 const gfx::Rect& selection_rect, 725 const gfx::Rect& selection_rect,
721 int active_match_ordinal, 726 int active_match_ordinal,
722 bool final_update); 727 bool final_update);
723 #if defined(OS_ANDROID) 728 #if defined(OS_ANDROID)
724 void OnFindMatchRectsReply(int version, 729 void OnFindMatchRectsReply(int version,
725 const std::vector<gfx::RectF>& rects, 730 const std::vector<gfx::RectF>& rects,
726 const gfx::RectF& active_rect); 731 const gfx::RectF& active_rect);
727 732
728 void OnOpenDateTimeDialog( 733 void OnOpenDateTimeDialog(
729 const ViewHostMsg_DateTimeDialogValue_Params& value); 734 const ViewHostMsg_DateTimeDialogValue_Params& value);
735 void OnJavaBridgeGetChannelHandle(IPC::Message* reply_msg);
730 #endif 736 #endif
731 void OnPepperPluginHung(int plugin_child_id, 737 void OnPepperPluginHung(int plugin_child_id,
732 const base::FilePath& path, 738 const base::FilePath& path,
733 bool is_hung); 739 bool is_hung);
734 void OnPluginCrashed(const base::FilePath& plugin_path, 740 void OnPluginCrashed(const base::FilePath& plugin_path,
735 base::ProcessId plugin_pid); 741 base::ProcessId plugin_pid);
736 void OnDomOperationResponse(const std::string& json_string, 742 void OnDomOperationResponse(const std::string& json_string,
737 int automation_id); 743 int automation_id);
738 void OnAppCacheAccessed(const GURL& manifest_url, bool blocked_by_policy); 744 void OnAppCacheAccessed(const GURL& manifest_url, bool blocked_by_policy);
739 void OnOpenColorChooser(int color_chooser_id, 745 void OnOpenColorChooser(int color_chooser_id,
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
914 // Maps the RenderFrameHost to its media_player_cookie and PowerSaveBlocker 920 // Maps the RenderFrameHost to its media_player_cookie and PowerSaveBlocker
915 // pairs. Key is the RenderFrameHost, value is the map which maps 921 // pairs. Key is the RenderFrameHost, value is the map which maps
916 // player_cookie on to PowerSaveBlocker. 922 // player_cookie on to PowerSaveBlocker.
917 typedef std::map<RenderFrameHost*, std::map<int64, PowerSaveBlocker*> > 923 typedef std::map<RenderFrameHost*, std::map<int64, PowerSaveBlocker*> >
918 PowerSaveBlockerMap; 924 PowerSaveBlockerMap;
919 PowerSaveBlockerMap power_save_blockers_; 925 PowerSaveBlockerMap power_save_blockers_;
920 926
921 // Manages the frame tree of the page and process swaps in each node. 927 // Manages the frame tree of the page and process swaps in each node.
922 FrameTree frame_tree_; 928 FrameTree frame_tree_;
923 929
930 #if defined(OS_ANDROID)
931 // Manages injecting Java objects into all RenderViewHosts associated with
932 // this WebContentsImpl.
933 scoped_ptr<JavaBridgeDispatcherHostManager>
934 java_bridge_dispatcher_host_manager_;
935 #endif
936
924 // SavePackage, lazily created. 937 // SavePackage, lazily created.
925 scoped_refptr<SavePackage> save_package_; 938 scoped_refptr<SavePackage> save_package_;
926 939
927 // Data for loading state ---------------------------------------------------- 940 // Data for loading state ----------------------------------------------------
928 941
929 // Indicates whether we're currently loading a resource. 942 // Indicates whether we're currently loading a resource.
930 bool is_loading_; 943 bool is_loading_;
931 944
932 // Indicates if the tab is considered crashed. 945 // Indicates if the tab is considered crashed.
933 base::TerminationStatus crashed_status_; 946 base::TerminationStatus crashed_status_;
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
1095 1108
1096 // Whether the last JavaScript dialog shown was suppressed. Used for testing. 1109 // Whether the last JavaScript dialog shown was suppressed. Used for testing.
1097 bool last_dialog_suppressed_; 1110 bool last_dialog_suppressed_;
1098 1111
1099 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); 1112 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl);
1100 }; 1113 };
1101 1114
1102 } // namespace content 1115 } // namespace content
1103 1116
1104 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 1117 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698