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

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.h

Issue 2948613002: [AudioStreamMonitor] Adds API to collect frame-level audibility. (Closed)
Patch Set: Fix windows build Created 3 years, 5 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
« no previous file with comments | « no previous file | content/browser/frame_host/render_frame_host_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 241
242 // Tracks whether the RenderFrame for this RenderFrameHost has been created in 242 // Tracks whether the RenderFrame for this RenderFrameHost has been created in
243 // the renderer process. This is currently only used for subframes. 243 // the renderer process. This is currently only used for subframes.
244 // TODO(creis): Use this for main frames as well when RVH goes away. 244 // TODO(creis): Use this for main frames as well when RVH goes away.
245 void SetRenderFrameCreated(bool created); 245 void SetRenderFrameCreated(bool created);
246 246
247 // Called for renderer-created windows to resume requests from this frame, 247 // Called for renderer-created windows to resume requests from this frame,
248 // after they are blocked in RenderWidgetHelper::CreateNewWindow. 248 // after they are blocked in RenderWidgetHelper::CreateNewWindow.
249 void Init(); 249 void Init();
250 250
251 // Returns true if the frame recently plays an audio.
252 bool is_audible() const { return is_audible_; }
253 void OnAudibleStateChanged(bool is_audible);
254
251 int routing_id() const { return routing_id_; } 255 int routing_id() const { return routing_id_; }
252 256
253 // Called when this frame has added a child. This is a continuation of an IPC 257 // Called when this frame has added a child. This is a continuation of an IPC
254 // that was partially handled on the IO thread (to allocate |new_routing_id|), 258 // that was partially handled on the IO thread (to allocate |new_routing_id|),
255 // and is forwarded here. The renderer has already been told to create a 259 // and is forwarded here. The renderer has already been told to create a
256 // RenderFrame with |new_routing_id|. 260 // RenderFrame with |new_routing_id|.
257 void OnCreateChildFrame(int new_routing_id, 261 void OnCreateChildFrame(int new_routing_id,
258 blink::WebTreeScopeType scope, 262 blink::WebTreeScopeType scope,
259 const std::string& frame_name, 263 const std::string& frame_name,
260 const std::string& frame_unique_name, 264 const std::string& frame_unique_name,
(...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after
1181 std::unique_ptr<WebUIImpl> pending_web_ui_; 1185 std::unique_ptr<WebUIImpl> pending_web_ui_;
1182 WebUI::TypeID pending_web_ui_type_; 1186 WebUI::TypeID pending_web_ui_type_;
1183 1187
1184 // If true the associated WebUI should be reused when CommitPendingWebUI is 1188 // If true the associated WebUI should be reused when CommitPendingWebUI is
1185 // called (no pending instance should be set). 1189 // called (no pending instance should be set).
1186 bool should_reuse_web_ui_; 1190 bool should_reuse_web_ui_;
1187 1191
1188 // If true, then the RenderFrame has selected text. 1192 // If true, then the RenderFrame has selected text.
1189 bool has_selection_; 1193 bool has_selection_;
1190 1194
1195 // If true, then this RenderFrame has one or more audio streams with audible
1196 // signal. If false, all audio streams are currently silent (or there are no
1197 // audio streams).
1198 bool is_audible_;
1199
1191 // PlzNavigate: The Previews state of the last navigation. This is used during 1200 // PlzNavigate: The Previews state of the last navigation. This is used during
1192 // history navigation of subframes to ensure that subframes navigate with the 1201 // history navigation of subframes to ensure that subframes navigate with the
1193 // same Previews status as the top-level frame. 1202 // same Previews status as the top-level frame.
1194 PreviewsState last_navigation_previews_state_; 1203 PreviewsState last_navigation_previews_state_;
1195 1204
1196 mojo::Binding<mojom::FrameHostInterfaceBroker> 1205 mojo::Binding<mojom::FrameHostInterfaceBroker>
1197 frame_host_interface_broker_binding_; 1206 frame_host_interface_broker_binding_;
1198 mojo::AssociatedBinding<mojom::FrameHost> frame_host_associated_binding_; 1207 mojo::AssociatedBinding<mojom::FrameHost> frame_host_associated_binding_;
1199 mojom::FramePtr frame_; 1208 mojom::FramePtr frame_;
1200 mojom::FrameBindingsControlAssociatedPtr frame_bindings_control_; 1209 mojom::FrameBindingsControlAssociatedPtr frame_bindings_control_;
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
1261 1270
1262 // NOTE: This must be the last member. 1271 // NOTE: This must be the last member.
1263 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; 1272 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_;
1264 1273
1265 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); 1274 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl);
1266 }; 1275 };
1267 1276
1268 } // namespace content 1277 } // namespace content
1269 1278
1270 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 1279 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/render_frame_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698