OLD | NEW |
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 Loading... |
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 Loading... |
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* GetWebContentsInterfaceRegistry() 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 867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1131 | 1133 |
1132 std::map<WebContentsImpl*, std::unique_ptr<DestructionObserver>> | 1134 std::map<WebContentsImpl*, std::unique_ptr<DestructionObserver>> |
1133 destruction_observers_; | 1135 destruction_observers_; |
1134 | 1136 |
1135 // A list of observers notified when page state changes. Weak references. | 1137 // A list of observers notified when page state changes. Weak references. |
1136 // This MUST be listed above frame_tree_ since at destruction time the | 1138 // This MUST be listed above frame_tree_ since at destruction time the |
1137 // latter might cause RenderViewHost's destructor to call us and we might use | 1139 // latter might cause RenderViewHost's destructor to call us and we might use |
1138 // the observer list then. | 1140 // the observer list then. |
1139 base::ObserverList<WebContentsObserver> observers_; | 1141 base::ObserverList<WebContentsObserver> observers_; |
1140 | 1142 |
| 1143 // Routed, associated interface bindings for each RenderFrameHost. |
| 1144 WebContentsInterfaceRegistryImpl interfaces_; |
| 1145 |
1141 // True if this tab was opened by another tab. This is not unset if the opener | 1146 // True if this tab was opened by another tab. This is not unset if the opener |
1142 // is closed. | 1147 // is closed. |
1143 bool created_with_opener_; | 1148 bool created_with_opener_; |
1144 | 1149 |
1145 // Helper classes ------------------------------------------------------------ | 1150 // Helper classes ------------------------------------------------------------ |
1146 | 1151 |
1147 // Manages the frame tree of the page and process swaps in each node. | 1152 // Manages the frame tree of the page and process swaps in each node. |
1148 FrameTree frame_tree_; | 1153 FrameTree frame_tree_; |
1149 | 1154 |
1150 // If this WebContents is part of a "tree of WebContents", then this contains | 1155 // 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 Loading... |
1446 // Adds/removes a callback called on creation of each new WebContents. | 1451 // Adds/removes a callback called on creation of each new WebContents. |
1447 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); | 1452 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); |
1448 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); | 1453 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); |
1449 | 1454 |
1450 DISALLOW_COPY_AND_ASSIGN(FriendZone); | 1455 DISALLOW_COPY_AND_ASSIGN(FriendZone); |
1451 }; | 1456 }; |
1452 | 1457 |
1453 } // namespace content | 1458 } // namespace content |
1454 | 1459 |
1455 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 1460 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
OLD | NEW |