| OLD | NEW |
| 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 | 12 |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/memory/scoped_vector.h" | 14 #include "base/memory/scoped_vector.h" |
| 15 #include "base/metrics/persistent_memory_allocator.h" | 15 #include "base/metrics/persistent_memory_allocator.h" |
| 16 #include "base/observer_list.h" | 16 #include "base/observer_list.h" |
| 17 #include "content/public/browser/render_process_host.h" | 17 #include "content/public/browser/render_process_host.h" |
| 18 #include "content/public/browser/render_process_host_factory.h" | 18 #include "content/public/browser/render_process_host_factory.h" |
| 19 #include "ipc/ipc_test_sink.h" | 19 #include "ipc/ipc_test_sink.h" |
| 20 #include "services/shell/public/cpp/interface_provider.h" | 20 #include "services/service_manager/public/cpp/interface_provider.h" |
| 21 | 21 |
| 22 class StoragePartition; | 22 class StoragePartition; |
| 23 | 23 |
| 24 namespace content { | 24 namespace content { |
| 25 | 25 |
| 26 class MockRenderProcessHostFactory; | 26 class MockRenderProcessHostFactory; |
| 27 | 27 |
| 28 // A mock render process host that has no corresponding renderer process. All | 28 // A mock render process host that has no corresponding renderer process. All |
| 29 // IPC messages are sent into the message sink for inspection by tests. | 29 // IPC messages are sent into the message sink for inspection by tests. |
| 30 class MockRenderProcessHost : public RenderProcessHost { | 30 class MockRenderProcessHost : public RenderProcessHost { |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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_ |
| OLD | NEW |