| 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 <utility> | 10 #include <utility> |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 std::unique_ptr<base::SharedPersistentMemoryAllocator> TakeMetricsAllocator() | 98 std::unique_ptr<base::SharedPersistentMemoryAllocator> TakeMetricsAllocator() |
| 99 override; | 99 override; |
| 100 const base::TimeTicks& GetInitTimeForNavigationMetrics() const override; | 100 const base::TimeTicks& GetInitTimeForNavigationMetrics() const override; |
| 101 #if defined(ENABLE_BROWSER_CDMS) | 101 #if defined(ENABLE_BROWSER_CDMS) |
| 102 scoped_refptr<media::MediaKeys> GetCdm(int render_frame_id, | 102 scoped_refptr<media::MediaKeys> GetCdm(int render_frame_id, |
| 103 int cdm_id) const override; | 103 int cdm_id) const override; |
| 104 #endif | 104 #endif |
| 105 bool IsProcessBackgrounded() const override; | 105 bool IsProcessBackgrounded() const override; |
| 106 void IncrementWorkerRefCount() override; | 106 void IncrementWorkerRefCount() override; |
| 107 void DecrementWorkerRefCount() override; | 107 void DecrementWorkerRefCount() override; |
| 108 void PurgeAndSuspend() override; |
| 108 | 109 |
| 109 // IPC::Sender via RenderProcessHost. | 110 // IPC::Sender via RenderProcessHost. |
| 110 bool Send(IPC::Message* msg) override; | 111 bool Send(IPC::Message* msg) override; |
| 111 | 112 |
| 112 // IPC::Listener via RenderProcessHost. | 113 // IPC::Listener via RenderProcessHost. |
| 113 bool OnMessageReceived(const IPC::Message& msg) override; | 114 bool OnMessageReceived(const IPC::Message& msg) override; |
| 114 void OnChannelConnected(int32_t peer_pid) override; | 115 void OnChannelConnected(int32_t peer_pid) override; |
| 115 | 116 |
| 116 // Attaches the factory object so we can remove this object in its destructor | 117 // Attaches the factory object so we can remove this object in its destructor |
| 117 // and prevent MockRenderProcessHostFacotry from deleting it. | 118 // and prevent MockRenderProcessHostFacotry from deleting it. |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 // for deleting all MockRenderProcessHosts that have not deleted by a test in | 184 // for deleting all MockRenderProcessHosts that have not deleted by a test in |
| 184 // the destructor and prevent them from being leaked. | 185 // the destructor and prevent them from being leaked. |
| 185 mutable ScopedVector<MockRenderProcessHost> processes_; | 186 mutable ScopedVector<MockRenderProcessHost> processes_; |
| 186 | 187 |
| 187 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHostFactory); | 188 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHostFactory); |
| 188 }; | 189 }; |
| 189 | 190 |
| 190 } // namespace content | 191 } // namespace content |
| 191 | 192 |
| 192 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_ | 193 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_ |
| OLD | NEW |