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 |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
240 | 240 |
241 // Tracks whether the RenderFrame for this RenderFrameHost has been created in | 241 // Tracks whether the RenderFrame for this RenderFrameHost has been created in |
242 // the renderer process. This is currently only used for subframes. | 242 // the renderer process. This is currently only used for subframes. |
243 // TODO(creis): Use this for main frames as well when RVH goes away. | 243 // TODO(creis): Use this for main frames as well when RVH goes away. |
244 void SetRenderFrameCreated(bool created); | 244 void SetRenderFrameCreated(bool created); |
245 | 245 |
246 // Called for renderer-created windows to resume requests from this frame, | 246 // Called for renderer-created windows to resume requests from this frame, |
247 // after they are blocked in RenderWidgetHelper::CreateNewWindow. | 247 // after they are blocked in RenderWidgetHelper::CreateNewWindow. |
248 void Init(); | 248 void Init(); |
249 | 249 |
250 // Returns true if the frame recently plays an audio. | |
251 bool IsAudible(); | |
DaleCurtis
2017/06/22 00:35:54
const? Prefer bool is_audible() const { return is_
lpy
2017/06/22 02:28:52
Done.
| |
252 void OnAudioStateChanged(bool audible); | |
253 | |
250 int routing_id() const { return routing_id_; } | 254 int routing_id() const { return routing_id_; } |
251 | 255 |
252 // Called when this frame has added a child. This is a continuation of an IPC | 256 // Called when this frame has added a child. This is a continuation of an IPC |
253 // that was partially handled on the IO thread (to allocate |new_routing_id|), | 257 // that was partially handled on the IO thread (to allocate |new_routing_id|), |
254 // and is forwarded here. The renderer has already been told to create a | 258 // and is forwarded here. The renderer has already been told to create a |
255 // RenderFrame with |new_routing_id|. | 259 // RenderFrame with |new_routing_id|. |
256 void OnCreateChildFrame(int new_routing_id, | 260 void OnCreateChildFrame(int new_routing_id, |
257 blink::WebTreeScopeType scope, | 261 blink::WebTreeScopeType scope, |
258 const std::string& frame_name, | 262 const std::string& frame_name, |
259 const std::string& frame_unique_name, | 263 const std::string& frame_unique_name, |
(...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1175 std::unique_ptr<WebUIImpl> pending_web_ui_; | 1179 std::unique_ptr<WebUIImpl> pending_web_ui_; |
1176 WebUI::TypeID pending_web_ui_type_; | 1180 WebUI::TypeID pending_web_ui_type_; |
1177 | 1181 |
1178 // If true the associated WebUI should be reused when CommitPendingWebUI is | 1182 // If true the associated WebUI should be reused when CommitPendingWebUI is |
1179 // called (no pending instance should be set). | 1183 // called (no pending instance should be set). |
1180 bool should_reuse_web_ui_; | 1184 bool should_reuse_web_ui_; |
1181 | 1185 |
1182 // If true, then the RenderFrame has selected text. | 1186 // If true, then the RenderFrame has selected text. |
1183 bool has_selection_; | 1187 bool has_selection_; |
1184 | 1188 |
1189 // If true, then the RenderFrame is playing audio. | |
1190 bool is_audible_; | |
1191 | |
1185 // PlzNavigate: The Previews state of the last navigation. This is used during | 1192 // PlzNavigate: The Previews state of the last navigation. This is used during |
1186 // history navigation of subframes to ensure that subframes navigate with the | 1193 // history navigation of subframes to ensure that subframes navigate with the |
1187 // same Previews status as the top-level frame. | 1194 // same Previews status as the top-level frame. |
1188 PreviewsState last_navigation_previews_state_; | 1195 PreviewsState last_navigation_previews_state_; |
1189 | 1196 |
1190 mojo::Binding<mojom::FrameHostInterfaceBroker> | 1197 mojo::Binding<mojom::FrameHostInterfaceBroker> |
1191 frame_host_interface_broker_binding_; | 1198 frame_host_interface_broker_binding_; |
1192 mojo::AssociatedBinding<mojom::FrameHost> frame_host_associated_binding_; | 1199 mojo::AssociatedBinding<mojom::FrameHost> frame_host_associated_binding_; |
1193 mojom::FramePtr frame_; | 1200 mojom::FramePtr frame_; |
1194 mojom::FrameBindingsControlAssociatedPtr frame_bindings_control_; | 1201 mojom::FrameBindingsControlAssociatedPtr frame_bindings_control_; |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1255 | 1262 |
1256 // NOTE: This must be the last member. | 1263 // NOTE: This must be the last member. |
1257 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; | 1264 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; |
1258 | 1265 |
1259 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); | 1266 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); |
1260 }; | 1267 }; |
1261 | 1268 |
1262 } // namespace content | 1269 } // namespace content |
1263 | 1270 |
1264 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 1271 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
OLD | NEW |