OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 CHROME_BROWSER_RENDERER_HOST_MOCK_RENDER_PROCESS_HOST_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_MOCK_RENDER_PROCESS_HOST_H_ |
6 #define CHROME_BROWSER_RENDERER_HOST_MOCK_RENDER_PROCESS_HOST_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_MOCK_RENDER_PROCESS_HOST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/scoped_vector.h" | 10 #include "base/scoped_vector.h" |
11 #include "chrome/browser/renderer_host/render_process_host.h" | 11 #include "chrome/browser/renderer_host/render_process_host.h" |
12 #include "chrome/common/ipc_test_sink.h" | 12 #include "ipc/ipc_test_sink.h" |
13 | 13 |
14 class MockRenderProcessHostFactory; | 14 class MockRenderProcessHostFactory; |
15 class TransportDIB; | 15 class TransportDIB; |
16 class URLRequestContextGetter; | 16 class URLRequestContextGetter; |
17 | 17 |
18 // A mock render process host that has no corresponding renderer process. All | 18 // A mock render process host that has no corresponding renderer process. All |
19 // IPC messages are sent into the message sink for inspection by tests. | 19 // IPC messages are sent into the message sink for inspection by tests. |
20 class MockRenderProcessHost : public RenderProcessHost { | 20 class MockRenderProcessHost : public RenderProcessHost { |
21 public: | 21 public: |
22 explicit MockRenderProcessHost(Profile* profile); | 22 explicit MockRenderProcessHost(Profile* profile); |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 private: | 93 private: |
94 // A list of MockRenderProcessHosts created by this object. This list is used | 94 // A list of MockRenderProcessHosts created by this object. This list is used |
95 // for deleting all MockRenderProcessHosts that have not deleted by a test in | 95 // for deleting all MockRenderProcessHosts that have not deleted by a test in |
96 // the destructor and prevent them from being leaked. | 96 // the destructor and prevent them from being leaked. |
97 mutable ScopedVector<MockRenderProcessHost> processes_; | 97 mutable ScopedVector<MockRenderProcessHost> processes_; |
98 | 98 |
99 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHostFactory); | 99 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHostFactory); |
100 }; | 100 }; |
101 | 101 |
102 #endif // CHROME_BROWSER_RENDERER_HOST_MOCK_RENDER_PROCESS_HOST_H_ | 102 #endif // CHROME_BROWSER_RENDERER_HOST_MOCK_RENDER_PROCESS_HOST_H_ |
OLD | NEW |