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

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

Issue 2310563002: Adds routed interface support between RenderFrameHost and RenderFrame (Closed)
Patch Set: . Created 4 years, 3 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
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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <functional> 10 #include <functional>
(...skipping 13 matching lines...) Expand all
24 #include "content/browser/frame_host/frame_tree.h" 24 #include "content/browser/frame_host/frame_tree.h"
25 #include "content/browser/frame_host/navigation_controller_delegate.h" 25 #include "content/browser/frame_host/navigation_controller_delegate.h"
26 #include "content/browser/frame_host/navigation_controller_impl.h" 26 #include "content/browser/frame_host/navigation_controller_impl.h"
27 #include "content/browser/frame_host/navigator_delegate.h" 27 #include "content/browser/frame_host/navigator_delegate.h"
28 #include "content/browser/frame_host/render_frame_host_delegate.h" 28 #include "content/browser/frame_host/render_frame_host_delegate.h"
29 #include "content/browser/frame_host/render_frame_host_manager.h" 29 #include "content/browser/frame_host/render_frame_host_manager.h"
30 #include "content/browser/media/audio_stream_monitor.h" 30 #include "content/browser/media/audio_stream_monitor.h"
31 #include "content/browser/renderer_host/render_view_host_delegate.h" 31 #include "content/browser/renderer_host/render_view_host_delegate.h"
32 #include "content/browser/renderer_host/render_view_host_impl.h" 32 #include "content/browser/renderer_host/render_view_host_impl.h"
33 #include "content/browser/renderer_host/render_widget_host_delegate.h" 33 #include "content/browser/renderer_host/render_widget_host_delegate.h"
34 #include "content/browser/web_contents/web_contents_interface_registry_impl.h"
34 #include "content/common/accessibility_mode_enums.h" 35 #include "content/common/accessibility_mode_enums.h"
35 #include "content/common/content_export.h" 36 #include "content/common/content_export.h"
36 #include "content/public/browser/color_chooser.h" 37 #include "content/public/browser/color_chooser.h"
37 #include "content/public/browser/notification_observer.h" 38 #include "content/public/browser/notification_observer.h"
38 #include "content/public/browser/notification_registrar.h" 39 #include "content/public/browser/notification_registrar.h"
39 #include "content/public/browser/web_contents.h" 40 #include "content/public/browser/web_contents.h"
40 #include "content/public/browser/web_contents_observer.h" 41 #include "content/public/browser/web_contents_observer.h"
41 #include "content/public/common/page_importance_signals.h" 42 #include "content/public/common/page_importance_signals.h"
42 #include "content/public/common/renderer_preferences.h" 43 #include "content/public/common/renderer_preferences.h"
43 #include "content/public/common/resource_type.h" 44 #include "content/public/common/resource_type.h"
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 // WebContents ------------------------------------------------------ 245 // WebContents ------------------------------------------------------
245 WebContentsDelegate* GetDelegate() override; 246 WebContentsDelegate* GetDelegate() override;
246 void SetDelegate(WebContentsDelegate* delegate) override; 247 void SetDelegate(WebContentsDelegate* delegate) override;
247 NavigationControllerImpl& GetController() override; 248 NavigationControllerImpl& GetController() override;
248 const NavigationControllerImpl& GetController() const override; 249 const NavigationControllerImpl& GetController() const override;
249 BrowserContext* GetBrowserContext() const override; 250 BrowserContext* GetBrowserContext() const override;
250 const GURL& GetURL() const override; 251 const GURL& GetURL() const override;
251 const GURL& GetVisibleURL() const override; 252 const GURL& GetVisibleURL() const override;
252 const GURL& GetLastCommittedURL() const override; 253 const GURL& GetLastCommittedURL() const override;
253 RenderProcessHost* GetRenderProcessHost() const override; 254 RenderProcessHost* GetRenderProcessHost() const override;
255 WebContentsInterfaceRegistry* GetInterfaces() override;
254 RenderFrameHostImpl* GetMainFrame() override; 256 RenderFrameHostImpl* GetMainFrame() override;
255 RenderFrameHostImpl* GetFocusedFrame() override; 257 RenderFrameHostImpl* GetFocusedFrame() override;
256 RenderFrameHostImpl* FindFrameByFrameTreeNodeId( 258 RenderFrameHostImpl* FindFrameByFrameTreeNodeId(
257 int frame_tree_node_id) override; 259 int frame_tree_node_id) override;
258 void ForEachFrame( 260 void ForEachFrame(
259 const base::Callback<void(RenderFrameHost*)>& on_frame) override; 261 const base::Callback<void(RenderFrameHost*)>& on_frame) override;
260 std::vector<RenderFrameHost*> GetAllFrames() override; 262 std::vector<RenderFrameHost*> GetAllFrames() override;
261 int SendToAllFrames(IPC::Message* message) override; 263 int SendToAllFrames(IPC::Message* message) override;
262 RenderViewHostImpl* GetRenderViewHost() const override; 264 RenderViewHostImpl* GetRenderViewHost() const override;
263 int GetRoutingID() const override; 265 int GetRoutingID() const override;
(...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after
1132 1134
1133 std::map<WebContentsImpl*, std::unique_ptr<DestructionObserver>> 1135 std::map<WebContentsImpl*, std::unique_ptr<DestructionObserver>>
1134 destruction_observers_; 1136 destruction_observers_;
1135 1137
1136 // A list of observers notified when page state changes. Weak references. 1138 // A list of observers notified when page state changes. Weak references.
1137 // This MUST be listed above frame_tree_ since at destruction time the 1139 // This MUST be listed above frame_tree_ since at destruction time the
1138 // latter might cause RenderViewHost's destructor to call us and we might use 1140 // latter might cause RenderViewHost's destructor to call us and we might use
1139 // the observer list then. 1141 // the observer list then.
1140 base::ObserverList<WebContentsObserver> observers_; 1142 base::ObserverList<WebContentsObserver> observers_;
1141 1143
1144 // Routed, associated interface bindings for each RenderFrameHost.
1145 WebContentsInterfaceRegistryImpl interfaces_;
1146
1142 // True if this tab was opened by another tab. This is not unset if the opener 1147 // True if this tab was opened by another tab. This is not unset if the opener
1143 // is closed. 1148 // is closed.
1144 bool created_with_opener_; 1149 bool created_with_opener_;
1145 1150
1146 // Helper classes ------------------------------------------------------------ 1151 // Helper classes ------------------------------------------------------------
1147 1152
1148 // Manages the frame tree of the page and process swaps in each node. 1153 // Manages the frame tree of the page and process swaps in each node.
1149 FrameTree frame_tree_; 1154 FrameTree frame_tree_;
1150 1155
1151 // If this WebContents is part of a "tree of WebContents", then this contains 1156 // If this WebContents is part of a "tree of WebContents", then this contains
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
1447 // Adds/removes a callback called on creation of each new WebContents. 1452 // Adds/removes a callback called on creation of each new WebContents.
1448 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); 1453 static void AddCreatedCallbackForTesting(const CreatedCallback& callback);
1449 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); 1454 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback);
1450 1455
1451 DISALLOW_COPY_AND_ASSIGN(FriendZone); 1456 DISALLOW_COPY_AND_ASSIGN(FriendZone);
1452 }; 1457 };
1453 1458
1454 } // namespace content 1459 } // namespace content
1455 1460
1456 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 1461 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698