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

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: use wrap 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
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 26 matching lines...) Expand all
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 25 matching lines...) Expand all
109 // this happens more than this many times, kill the renderer. 110 // this happens more than this many times, kill the renderer.
110 static const int kMaxAccessibilityResets = 5; 111 static const int kMaxAccessibilityResets = 5;
111 112
112 static RenderFrameHostImpl* FromID(int process_id, int routing_id); 113 static RenderFrameHostImpl* FromID(int process_id, int routing_id);
113 static RenderFrameHostImpl* FromAXTreeID( 114 static RenderFrameHostImpl* FromAXTreeID(
114 AXTreeIDRegistry::AXTreeID ax_tree_id); 115 AXTreeIDRegistry::AXTreeID ax_tree_id);
115 116
116 ~RenderFrameHostImpl() override; 117 ~RenderFrameHostImpl() override;
117 118
118 // RenderFrameHost 119 // RenderFrameHost
120 AudioOutputImpl* GetAudioOutputImpl() override;
121
122 void SetAudioOutputImpl(AudioOutputImpl* audio_output_impl) override;
nasko 2016/05/25 20:50:41 No spaces between methods that are overriden.
rchtara 2016/05/27 15:24:38 Done.
123
119 int GetRoutingID() override; 124 int GetRoutingID() override;
120 AXTreeIDRegistry::AXTreeID GetAXTreeID() override; 125 AXTreeIDRegistry::AXTreeID GetAXTreeID() override;
121 SiteInstanceImpl* GetSiteInstance() override; 126 SiteInstanceImpl* GetSiteInstance() override;
122 RenderProcessHost* GetProcess() override; 127 RenderProcessHost* GetProcess() override;
123 RenderWidgetHostView* GetView() override; 128 RenderWidgetHostView* GetView() override;
124 RenderFrameHostImpl* GetParent() override; 129 RenderFrameHostImpl* GetParent() override;
125 int GetFrameTreeNodeId() override; 130 int GetFrameTreeNodeId() override;
126 const std::string& GetFrameName() override; 131 const std::string& GetFrameName() override;
127 bool IsCrossProcessSubframe() override; 132 bool IsCrossProcessSubframe() override;
128 const GURL& GetLastCommittedURL() override; 133 const GURL& GetLastCommittedURL() override;
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 void CreateWebBluetoothService( 762 void CreateWebBluetoothService(
758 mojo::InterfaceRequest<blink::mojom::WebBluetoothService> request); 763 mojo::InterfaceRequest<blink::mojom::WebBluetoothService> request);
759 764
760 // Deletes the Web Bluetooth Service owned by the frame. 765 // Deletes the Web Bluetooth Service owned by the frame.
761 void DeleteWebBluetoothService(); 766 void DeleteWebBluetoothService();
762 767
763 // Allows tests to disable the swapout event timer to simulate bugs that 768 // Allows tests to disable the swapout event timer to simulate bugs that
764 // happen before it fires (to avoid flakiness). 769 // happen before it fires (to avoid flakiness).
765 void DisableSwapOutTimerForTesting(); 770 void DisableSwapOutTimerForTesting();
766 771
772 AudioOutputImpl* audio_output_impl_;
nasko 2016/05/25 20:50:41 Add a comment on what this new member is.
rchtara 2016/05/27 15:24:38 Done.
773
767 // For now, RenderFrameHosts indirectly keep RenderViewHosts alive via a 774 // For now, RenderFrameHosts indirectly keep RenderViewHosts alive via a
768 // refcount that calls Shutdown when it reaches zero. This allows each 775 // refcount that calls Shutdown when it reaches zero. This allows each
769 // RenderFrameHostManager to just care about RenderFrameHosts, while ensuring 776 // RenderFrameHostManager to just care about RenderFrameHosts, while ensuring
770 // we have a RenderViewHost for each RenderFrameHost. 777 // we have a RenderViewHost for each RenderFrameHost.
771 // TODO(creis): RenderViewHost will eventually go away and be replaced with 778 // TODO(creis): RenderViewHost will eventually go away and be replaced with
772 // some form of page context. 779 // some form of page context.
773 RenderViewHostImpl* render_view_host_; 780 RenderViewHostImpl* render_view_host_;
774 781
775 RenderFrameHostDelegate* delegate_; 782 RenderFrameHostDelegate* delegate_;
776 783
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
981 988
982 // NOTE: This must be the last member. 989 // NOTE: This must be the last member.
983 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; 990 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_;
984 991
985 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); 992 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl);
986 }; 993 };
987 994
988 } // namespace content 995 } // namespace content
989 996
990 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 997 #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') | content/browser/media/audio_output_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698