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

Side by Side Diff: content/public/test/mock_render_process_host.h

Issue 2420253002: Rename shell namespace to service_manager (Closed)
Patch Set: . Created 4 years, 2 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 | « content/public/renderer/render_frame.h ('k') | content/public/test/mock_render_process_host.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_ 5 #ifndef CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_
6 #define CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_ 6 #define CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 #include <memory> 10 #include <memory>
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 bool StopWebRTCEventLog() override; 85 bool StopWebRTCEventLog() override;
86 void SetWebRtcLogMessageCallback( 86 void SetWebRtcLogMessageCallback(
87 base::Callback<void(const std::string&)> callback) override; 87 base::Callback<void(const std::string&)> callback) override;
88 void ClearWebRtcLogMessageCallback() override; 88 void ClearWebRtcLogMessageCallback() override;
89 WebRtcStopRtpDumpCallback StartRtpDump( 89 WebRtcStopRtpDumpCallback StartRtpDump(
90 bool incoming, 90 bool incoming,
91 bool outgoing, 91 bool outgoing,
92 const WebRtcRtpPacketCallback& packet_callback) override; 92 const WebRtcRtpPacketCallback& packet_callback) override;
93 #endif 93 #endif
94 void ResumeDeferredNavigation(const GlobalRequestID& request_id) override; 94 void ResumeDeferredNavigation(const GlobalRequestID& request_id) override;
95 shell::InterfaceProvider* GetRemoteInterfaces() override; 95 service_manager::InterfaceProvider* GetRemoteInterfaces() override;
96 std::unique_ptr<base::SharedPersistentMemoryAllocator> TakeMetricsAllocator() 96 std::unique_ptr<base::SharedPersistentMemoryAllocator> TakeMetricsAllocator()
97 override; 97 override;
98 const base::TimeTicks& GetInitTimeForNavigationMetrics() const override; 98 const base::TimeTicks& GetInitTimeForNavigationMetrics() const override;
99 bool IsProcessBackgrounded() const override; 99 bool IsProcessBackgrounded() const override;
100 void IncrementServiceWorkerRefCount() override; 100 void IncrementServiceWorkerRefCount() override;
101 void DecrementServiceWorkerRefCount() override; 101 void DecrementServiceWorkerRefCount() override;
102 void IncrementSharedWorkerRefCount() override; 102 void IncrementSharedWorkerRefCount() override;
103 void DecrementSharedWorkerRefCount() override; 103 void DecrementSharedWorkerRefCount() override;
104 void ForceReleaseWorkerRefCounts() override; 104 void ForceReleaseWorkerRefCounts() override;
105 bool IsWorkerRefCountDisabled() override; 105 bool IsWorkerRefCountDisabled() override;
(...skipping 23 matching lines...) Expand all
129 void SetProcessHandle(std::unique_ptr<base::ProcessHandle> new_handle) { 129 void SetProcessHandle(std::unique_ptr<base::ProcessHandle> new_handle) {
130 process_handle = std::move(new_handle); 130 process_handle = std::move(new_handle);
131 } 131 }
132 132
133 void GetAudioOutputControllers( 133 void GetAudioOutputControllers(
134 const GetAudioOutputControllersCallback& callback) const override {} 134 const GetAudioOutputControllersCallback& callback) const override {}
135 135
136 int worker_ref_count() const { return worker_ref_count_; } 136 int worker_ref_count() const { return worker_ref_count_; }
137 137
138 void SetRemoteInterfaces( 138 void SetRemoteInterfaces(
139 std::unique_ptr<shell::InterfaceProvider> remote_interfaces) { 139 std::unique_ptr<service_manager::InterfaceProvider> remote_interfaces) {
140 remote_interfaces_ = std::move(remote_interfaces); 140 remote_interfaces_ = std::move(remote_interfaces);
141 } 141 }
142 142
143 private: 143 private:
144 // Stores IPC messages that would have been sent to the renderer. 144 // Stores IPC messages that would have been sent to the renderer.
145 IPC::TestSink sink_; 145 IPC::TestSink sink_;
146 int bad_msg_count_; 146 int bad_msg_count_;
147 const MockRenderProcessHostFactory* factory_; 147 const MockRenderProcessHostFactory* factory_;
148 int id_; 148 int id_;
149 bool has_connection_; 149 bool has_connection_;
150 BrowserContext* browser_context_; 150 BrowserContext* browser_context_;
151 base::ObserverList<RenderProcessHostObserver> observers_; 151 base::ObserverList<RenderProcessHostObserver> observers_;
152 152
153 IDMap<RenderWidgetHost> render_widget_hosts_; 153 IDMap<RenderWidgetHost> render_widget_hosts_;
154 int prev_routing_id_; 154 int prev_routing_id_;
155 IDMap<IPC::Listener> listeners_; 155 IDMap<IPC::Listener> listeners_;
156 bool fast_shutdown_started_; 156 bool fast_shutdown_started_;
157 bool deletion_callback_called_; 157 bool deletion_callback_called_;
158 bool is_for_guests_only_; 158 bool is_for_guests_only_;
159 bool is_process_backgrounded_; 159 bool is_process_backgrounded_;
160 std::unique_ptr<base::ProcessHandle> process_handle; 160 std::unique_ptr<base::ProcessHandle> process_handle;
161 int worker_ref_count_; 161 int worker_ref_count_;
162 std::unique_ptr<shell::InterfaceProvider> remote_interfaces_; 162 std::unique_ptr<service_manager::InterfaceProvider> remote_interfaces_;
163 163
164 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHost); 164 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHost);
165 }; 165 };
166 166
167 class MockRenderProcessHostFactory : public RenderProcessHostFactory { 167 class MockRenderProcessHostFactory : public RenderProcessHostFactory {
168 public: 168 public:
169 MockRenderProcessHostFactory(); 169 MockRenderProcessHostFactory();
170 ~MockRenderProcessHostFactory() override; 170 ~MockRenderProcessHostFactory() override;
171 171
172 RenderProcessHost* CreateRenderProcessHost( 172 RenderProcessHost* CreateRenderProcessHost(
(...skipping 10 matching lines...) Expand all
183 // for deleting all MockRenderProcessHosts that have not deleted by a test in 183 // for deleting all MockRenderProcessHosts that have not deleted by a test in
184 // the destructor and prevent them from being leaked. 184 // the destructor and prevent them from being leaked.
185 mutable ScopedVector<MockRenderProcessHost> processes_; 185 mutable ScopedVector<MockRenderProcessHost> processes_;
186 186
187 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHostFactory); 187 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHostFactory);
188 }; 188 };
189 189
190 } // namespace content 190 } // namespace content
191 191
192 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_ 192 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_
OLDNEW
« no previous file with comments | « content/public/renderer/render_frame.h ('k') | content/public/test/mock_render_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698