OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
11 #include <map> | 11 #include <map> |
12 #include <set> | 12 #include <set> |
13 #include <string> | 13 #include <string> |
14 #include <vector> | 14 #include <vector> |
15 | 15 |
16 #include "base/callback.h" | 16 #include "base/callback.h" |
17 #include "base/compiler_specific.h" | 17 #include "base/compiler_specific.h" |
18 #include "base/gtest_prod_util.h" | 18 #include "base/gtest_prod_util.h" |
19 #include "base/macros.h" | 19 #include "base/macros.h" |
20 #include "base/memory/weak_ptr.h" | 20 #include "base/memory/weak_ptr.h" |
21 #include "base/strings/string16.h" | 21 #include "base/strings/string16.h" |
22 #include "base/time/time.h" | 22 #include "base/time/time.h" |
23 #include "build/build_config.h" | 23 #include "build/build_config.h" |
24 #include "content/browser/accessibility/browser_accessibility_manager.h" | 24 #include "content/browser/accessibility/browser_accessibility_manager.h" |
25 #include "content/browser/bad_message.h" | 25 #include "content/browser/bad_message.h" |
26 #include "content/browser/loader/global_routing_id.h" | 26 #include "content/browser/loader/global_routing_id.h" |
| 27 #include "content/browser/media/audio_output_impl.h" |
27 #include "content/browser/site_instance_impl.h" | 28 #include "content/browser/site_instance_impl.h" |
28 #include "content/browser/webui/web_ui_impl.h" | 29 #include "content/browser/webui/web_ui_impl.h" |
29 #include "content/common/accessibility_mode_enums.h" | 30 #include "content/common/accessibility_mode_enums.h" |
30 #include "content/common/ax_content_node_data.h" | 31 #include "content/common/ax_content_node_data.h" |
31 #include "content/common/content_export.h" | 32 #include "content/common/content_export.h" |
32 #include "content/common/frame_message_enums.h" | 33 #include "content/common/frame_message_enums.h" |
33 #include "content/common/frame_replication_state.h" | 34 #include "content/common/frame_replication_state.h" |
34 #include "content/common/image_downloader/image_downloader.mojom.h" | 35 #include "content/common/image_downloader/image_downloader.mojom.h" |
35 #include "content/common/mojo/service_registry_impl.h" | 36 #include "content/common/mojo/service_registry_impl.h" |
36 #include "content/common/navigation_params.h" | 37 #include "content/common/navigation_params.h" |
(...skipping 26 matching lines...) Expand all Loading... |
63 class ListValue; | 64 class ListValue; |
64 } | 65 } |
65 | 66 |
66 namespace blink { | 67 namespace blink { |
67 namespace mojom { | 68 namespace mojom { |
68 class WebBluetoothService; | 69 class WebBluetoothService; |
69 } | 70 } |
70 } | 71 } |
71 | 72 |
72 namespace content { | 73 namespace content { |
73 | 74 class AudioOutputImpl; |
74 class CrossProcessFrameConnector; | 75 class CrossProcessFrameConnector; |
75 class CrossSiteTransferringRequest; | 76 class CrossSiteTransferringRequest; |
76 class FrameMojoShell; | 77 class FrameMojoShell; |
77 class FrameTree; | 78 class FrameTree; |
78 class FrameTreeNode; | 79 class FrameTreeNode; |
79 class NavigationHandleImpl; | 80 class NavigationHandleImpl; |
80 class PermissionServiceContext; | 81 class PermissionServiceContext; |
81 class RenderFrameHostDelegate; | 82 class RenderFrameHostDelegate; |
82 class RenderFrameProxyHost; | 83 class RenderFrameProxyHost; |
83 class RenderProcessHost; | 84 class RenderProcessHost; |
(...skipping 24 matching lines...) Expand all Loading... |
108 // this happens more than this many times, kill the renderer. | 109 // this happens more than this many times, kill the renderer. |
109 static const int kMaxAccessibilityResets = 5; | 110 static const int kMaxAccessibilityResets = 5; |
110 | 111 |
111 static RenderFrameHostImpl* FromID(int process_id, int routing_id); | 112 static RenderFrameHostImpl* FromID(int process_id, int routing_id); |
112 static RenderFrameHostImpl* FromAXTreeID( | 113 static RenderFrameHostImpl* FromAXTreeID( |
113 AXTreeIDRegistry::AXTreeID ax_tree_id); | 114 AXTreeIDRegistry::AXTreeID ax_tree_id); |
114 | 115 |
115 ~RenderFrameHostImpl() override; | 116 ~RenderFrameHostImpl() override; |
116 | 117 |
117 // RenderFrameHost | 118 // RenderFrameHost |
| 119 AudioOutputImpl* GetAudioOutputImpl() override; |
| 120 |
| 121 void SetAudioOutputImpl(AudioOutputImpl* audio_output_impl) override; |
| 122 |
118 int GetRoutingID() override; | 123 int GetRoutingID() override; |
119 AXTreeIDRegistry::AXTreeID GetAXTreeID() override; | 124 AXTreeIDRegistry::AXTreeID GetAXTreeID() override; |
120 SiteInstanceImpl* GetSiteInstance() override; | 125 SiteInstanceImpl* GetSiteInstance() override; |
121 RenderProcessHost* GetProcess() override; | 126 RenderProcessHost* GetProcess() override; |
122 RenderWidgetHostView* GetView() override; | 127 RenderWidgetHostView* GetView() override; |
123 RenderFrameHostImpl* GetParent() override; | 128 RenderFrameHostImpl* GetParent() override; |
124 int GetFrameTreeNodeId() override; | 129 int GetFrameTreeNodeId() override; |
125 const std::string& GetFrameName() override; | 130 const std::string& GetFrameName() override; |
126 bool IsCrossProcessSubframe() override; | 131 bool IsCrossProcessSubframe() override; |
127 const GURL& GetLastCommittedURL() override; | 132 const GURL& GetLastCommittedURL() override; |
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
749 void CreateWebBluetoothService( | 754 void CreateWebBluetoothService( |
750 mojo::InterfaceRequest<blink::mojom::WebBluetoothService> request); | 755 mojo::InterfaceRequest<blink::mojom::WebBluetoothService> request); |
751 | 756 |
752 // Deletes the Web Bluetooth Service owned by the frame. | 757 // Deletes the Web Bluetooth Service owned by the frame. |
753 void DeleteWebBluetoothService(); | 758 void DeleteWebBluetoothService(); |
754 | 759 |
755 // Allows tests to disable the swapout event timer to simulate bugs that | 760 // Allows tests to disable the swapout event timer to simulate bugs that |
756 // happen before it fires (to avoid flakiness). | 761 // happen before it fires (to avoid flakiness). |
757 void DisableSwapOutTimerForTesting(); | 762 void DisableSwapOutTimerForTesting(); |
758 | 763 |
| 764 AudioOutputImpl* audio_output_impl_; |
| 765 |
759 // For now, RenderFrameHosts indirectly keep RenderViewHosts alive via a | 766 // For now, RenderFrameHosts indirectly keep RenderViewHosts alive via a |
760 // refcount that calls Shutdown when it reaches zero. This allows each | 767 // refcount that calls Shutdown when it reaches zero. This allows each |
761 // RenderFrameHostManager to just care about RenderFrameHosts, while ensuring | 768 // RenderFrameHostManager to just care about RenderFrameHosts, while ensuring |
762 // we have a RenderViewHost for each RenderFrameHost. | 769 // we have a RenderViewHost for each RenderFrameHost. |
763 // TODO(creis): RenderViewHost will eventually go away and be replaced with | 770 // TODO(creis): RenderViewHost will eventually go away and be replaced with |
764 // some form of page context. | 771 // some form of page context. |
765 RenderViewHostImpl* render_view_host_; | 772 RenderViewHostImpl* render_view_host_; |
766 | 773 |
767 RenderFrameHostDelegate* delegate_; | 774 RenderFrameHostDelegate* delegate_; |
768 | 775 |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
973 | 980 |
974 // NOTE: This must be the last member. | 981 // NOTE: This must be the last member. |
975 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; | 982 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; |
976 | 983 |
977 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); | 984 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); |
978 }; | 985 }; |
979 | 986 |
980 } // namespace content | 987 } // namespace content |
981 | 988 |
982 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 989 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
OLD | NEW |