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

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

Issue 2958133003: Enable GRC
Patch Set: Rebase 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 | « content/public/test/DEPS ('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>
11 #include <utility> 11 #include <utility>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
16 #include "base/metrics/persistent_memory_allocator.h" 16 #include "base/metrics/persistent_memory_allocator.h"
17 #include "base/observer_list.h" 17 #include "base/observer_list.h"
18 #include "content/public/browser/render_process_host.h" 18 #include "content/public/browser/render_process_host.h"
19 #include "content/public/browser/render_process_host_factory.h" 19 #include "content/public/browser/render_process_host_factory.h"
20 #include "ipc/ipc_test_sink.h" 20 #include "ipc/ipc_test_sink.h"
21 #include "media/media_features.h" 21 #include "media/media_features.h"
22 #include "mojo/public/cpp/bindings/associated_interface_ptr.h" 22 #include "mojo/public/cpp/bindings/associated_interface_ptr.h"
23 #include "services/resource_coordinator/public/cpp/resource_coordinator_interfac e.h"
23 #include "services/service_manager/public/cpp/identity.h" 24 #include "services/service_manager/public/cpp/identity.h"
24 #include "services/service_manager/public/cpp/interface_provider.h" 25 #include "services/service_manager/public/cpp/interface_provider.h"
25 26
26 class StoragePartition; 27 class StoragePartition;
27 28
28 namespace content { 29 namespace content {
29 30
30 class MockRenderProcessHostFactory; 31 class MockRenderProcessHostFactory;
31 class RenderWidgetHost; 32 class RenderWidgetHost;
32 33
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 bool fast_shutdown_started_; 175 bool fast_shutdown_started_;
175 bool deletion_callback_called_; 176 bool deletion_callback_called_;
176 bool is_for_guests_only_; 177 bool is_for_guests_only_;
177 bool is_process_backgrounded_; 178 bool is_process_backgrounded_;
178 bool is_unused_; 179 bool is_unused_;
179 std::unique_ptr<base::ProcessHandle> process_handle; 180 std::unique_ptr<base::ProcessHandle> process_handle;
180 int worker_ref_count_; 181 int worker_ref_count_;
181 std::unique_ptr<mojo::AssociatedInterfacePtr<mojom::Renderer>> 182 std::unique_ptr<mojo::AssociatedInterfacePtr<mojom::Renderer>>
182 renderer_interface_; 183 renderer_interface_;
183 std::map<std::string, InterfaceBinder> binder_overrides_; 184 std::map<std::string, InterfaceBinder> binder_overrides_;
185 std::unique_ptr<resource_coordinator::ResourceCoordinatorInterface>
186 process_resource_coordinator_;
184 service_manager::Identity child_identity_; 187 service_manager::Identity child_identity_;
185 base::WeakPtrFactory<MockRenderProcessHost> weak_ptr_factory_; 188 base::WeakPtrFactory<MockRenderProcessHost> weak_ptr_factory_;
186 189
187 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHost); 190 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHost);
188 }; 191 };
189 192
190 class MockRenderProcessHostFactory : public RenderProcessHostFactory { 193 class MockRenderProcessHostFactory : public RenderProcessHostFactory {
191 public: 194 public:
192 MockRenderProcessHostFactory(); 195 MockRenderProcessHostFactory();
193 ~MockRenderProcessHostFactory() override; 196 ~MockRenderProcessHostFactory() override;
(...skipping 11 matching lines...) Expand all
205 // for deleting all MockRenderProcessHosts that have not deleted by a test in 208 // for deleting all MockRenderProcessHosts that have not deleted by a test in
206 // the destructor and prevent them from being leaked. 209 // the destructor and prevent them from being leaked.
207 mutable std::vector<std::unique_ptr<MockRenderProcessHost>> processes_; 210 mutable std::vector<std::unique_ptr<MockRenderProcessHost>> processes_;
208 211
209 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHostFactory); 212 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHostFactory);
210 }; 213 };
211 214
212 } // namespace content 215 } // namespace content
213 216
214 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_ 217 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_
OLDNEW
« no previous file with comments | « content/public/test/DEPS ('k') | content/public/test/mock_render_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698