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

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

Issue 1930393002: Switch stream creation and closing in Chrome audio rendering from IPC to Mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unique_ptr for Binding Created 4 years, 6 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
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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 198
198 // Tracks whether the RenderFrame for this RenderFrameHost has been created in 199 // Tracks whether the RenderFrame for this RenderFrameHost has been created in
199 // the renderer process. This is currently only used for subframes. 200 // the renderer process. This is currently only used for subframes.
200 // TODO(creis): Use this for main frames as well when RVH goes away. 201 // TODO(creis): Use this for main frames as well when RVH goes away.
201 void SetRenderFrameCreated(bool created); 202 void SetRenderFrameCreated(bool created);
202 203
203 // Called for renderer-created windows to resume requests from this frame, 204 // Called for renderer-created windows to resume requests from this frame,
204 // after they are blocked in RenderWidgetHelper::CreateNewWindow. 205 // after they are blocked in RenderWidgetHelper::CreateNewWindow.
205 void Init(); 206 void Init();
206 207
208 void set_audio_output_impl(AudioOutputImpl* audio_output_impl) {
209 audio_output_impl_ = audio_output_impl;
210 }
211
207 int routing_id() const { return routing_id_; } 212 int routing_id() const { return routing_id_; }
208 void OnCreateChildFrame( 213 void OnCreateChildFrame(
209 int new_routing_id, 214 int new_routing_id,
210 blink::WebTreeScopeType scope, 215 blink::WebTreeScopeType scope,
211 const std::string& frame_name, 216 const std::string& frame_name,
212 const std::string& frame_unique_name, 217 const std::string& frame_unique_name,
213 blink::WebSandboxFlags sandbox_flags, 218 blink::WebSandboxFlags sandbox_flags,
214 const blink::WebFrameOwnerProperties& frame_owner_properties); 219 const blink::WebFrameOwnerProperties& frame_owner_properties);
215 220
216 RenderViewHostImpl* render_view_host() { return render_view_host_; } 221 RenderViewHostImpl* render_view_host() { return render_view_host_; }
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 // the renderer process. Currently only used for subframes. 845 // the renderer process. Currently only used for subframes.
841 // TODO(creis): Use this for main frames as well when RVH goes away. 846 // TODO(creis): Use this for main frames as well when RVH goes away.
842 bool render_frame_created_; 847 bool render_frame_created_;
843 848
844 // Whether we should buffer outgoing Navigate messages rather than sending 849 // Whether we should buffer outgoing Navigate messages rather than sending
845 // them. This will be true when a RenderFrameHost is created for a cross-site 850 // them. This will be true when a RenderFrameHost is created for a cross-site
846 // request, until we hear back from the onbeforeunload handler of the old 851 // request, until we hear back from the onbeforeunload handler of the old
847 // RenderFrameHost. 852 // RenderFrameHost.
848 bool navigations_suspended_; 853 bool navigations_suspended_;
849 854
855 AudioOutputImpl* audio_output_impl_;
856
850 // Holds the parameters for a suspended navigation. This can only happen while 857 // Holds the parameters for a suspended navigation. This can only happen while
851 // this RFH is the pending RenderFrameHost of a RenderFrameHostManager. There 858 // this RFH is the pending RenderFrameHost of a RenderFrameHostManager. There
852 // will only ever be one suspended navigation, because RenderFrameHostManager 859 // will only ever be one suspended navigation, because RenderFrameHostManager
853 // will destroy the pending RenderFrameHost and create a new one if a second 860 // will destroy the pending RenderFrameHost and create a new one if a second
854 // navigation occurs. 861 // navigation occurs.
855 // PlzNavigate: unused as navigations are never suspended. 862 // PlzNavigate: unused as navigations are never suspended.
856 std::unique_ptr<NavigationParams> suspended_nav_params_; 863 std::unique_ptr<NavigationParams> suspended_nav_params_;
857 864
858 // When the last BeforeUnload message was sent. 865 // When the last BeforeUnload message was sent.
859 base::TimeTicks send_before_unload_start_time_; 866 base::TimeTicks send_before_unload_start_time_;
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 986
980 // NOTE: This must be the last member. 987 // NOTE: This must be the last member.
981 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; 988 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_;
982 989
983 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); 990 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl);
984 }; 991 };
985 992
986 } // namespace content 993 } // namespace content
987 994
988 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 995 #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