| 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> |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 | 41 |
| 42 // Provides tests a way to simulate this render process crashing. | 42 // Provides tests a way to simulate this render process crashing. |
| 43 void SimulateCrash(); | 43 void SimulateCrash(); |
| 44 | 44 |
| 45 // RenderProcessHost implementation (public portion). | 45 // RenderProcessHost implementation (public portion). |
| 46 void EnableSendQueue() override; | 46 void EnableSendQueue() override; |
| 47 bool Init() override; | 47 bool Init() override; |
| 48 int GetNextRoutingID() override; | 48 int GetNextRoutingID() override; |
| 49 void AddRoute(int32_t routing_id, IPC::Listener* listener) override; | 49 void AddRoute(int32_t routing_id, IPC::Listener* listener) override; |
| 50 void RemoveRoute(int32_t routing_id) override; | 50 void RemoveRoute(int32_t routing_id) override; |
| 51 void AddRoutedInterfaces(int32_t routing_id, |
| 52 mojom::RoutedInterfaceProvider* provider) override; |
| 53 mojo::AssociatedGroup* GetRoutedInterfaceGroup() override; |
| 51 void AddObserver(RenderProcessHostObserver* observer) override; | 54 void AddObserver(RenderProcessHostObserver* observer) override; |
| 52 void RemoveObserver(RenderProcessHostObserver* observer) override; | 55 void RemoveObserver(RenderProcessHostObserver* observer) override; |
| 53 void ShutdownForBadMessage() override; | 56 void ShutdownForBadMessage() override; |
| 54 void WidgetRestored() override; | 57 void WidgetRestored() override; |
| 55 void WidgetHidden() override; | 58 void WidgetHidden() override; |
| 56 int VisibleWidgetCount() const override; | 59 int VisibleWidgetCount() const override; |
| 57 void AudioStateChanged() override; | 60 void AudioStateChanged() override; |
| 58 bool IsForGuestsOnly() const override; | 61 bool IsForGuestsOnly() const override; |
| 59 StoragePartition* GetStoragePartition() const override; | 62 StoragePartition* GetStoragePartition() const override; |
| 60 virtual void AddWord(const base::string16& word); | 63 virtual void AddWord(const base::string16& word); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 88 base::Callback<void(const std::string&)> callback) override; | 91 base::Callback<void(const std::string&)> callback) override; |
| 89 void ClearWebRtcLogMessageCallback() override; | 92 void ClearWebRtcLogMessageCallback() override; |
| 90 WebRtcStopRtpDumpCallback StartRtpDump( | 93 WebRtcStopRtpDumpCallback StartRtpDump( |
| 91 bool incoming, | 94 bool incoming, |
| 92 bool outgoing, | 95 bool outgoing, |
| 93 const WebRtcRtpPacketCallback& packet_callback) override; | 96 const WebRtcRtpPacketCallback& packet_callback) override; |
| 94 #endif | 97 #endif |
| 95 void ResumeDeferredNavigation(const GlobalRequestID& request_id) override; | 98 void ResumeDeferredNavigation(const GlobalRequestID& request_id) override; |
| 96 void NotifyTimezoneChange(const std::string& zone_id) override; | 99 void NotifyTimezoneChange(const std::string& zone_id) override; |
| 97 shell::InterfaceProvider* GetRemoteInterfaces() override; | 100 shell::InterfaceProvider* GetRemoteInterfaces() override; |
| 101 mojom::RouteProvider* GetRemoteRouteProvider() override; |
| 98 std::unique_ptr<base::SharedPersistentMemoryAllocator> TakeMetricsAllocator() | 102 std::unique_ptr<base::SharedPersistentMemoryAllocator> TakeMetricsAllocator() |
| 99 override; | 103 override; |
| 100 const base::TimeTicks& GetInitTimeForNavigationMetrics() const override; | 104 const base::TimeTicks& GetInitTimeForNavigationMetrics() const override; |
| 101 #if defined(ENABLE_BROWSER_CDMS) | 105 #if defined(ENABLE_BROWSER_CDMS) |
| 102 scoped_refptr<media::MediaKeys> GetCdm(int render_frame_id, | 106 scoped_refptr<media::MediaKeys> GetCdm(int render_frame_id, |
| 103 int cdm_id) const override; | 107 int cdm_id) const override; |
| 104 #endif | 108 #endif |
| 105 bool IsProcessBackgrounded() const override; | 109 bool IsProcessBackgrounded() const override; |
| 106 void IncrementWorkerRefCount() override; | 110 void IncrementWorkerRefCount() override; |
| 107 void DecrementWorkerRefCount() override; | 111 void DecrementWorkerRefCount() override; |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 // for deleting all MockRenderProcessHosts that have not deleted by a test in | 189 // for deleting all MockRenderProcessHosts that have not deleted by a test in |
| 186 // the destructor and prevent them from being leaked. | 190 // the destructor and prevent them from being leaked. |
| 187 mutable ScopedVector<MockRenderProcessHost> processes_; | 191 mutable ScopedVector<MockRenderProcessHost> processes_; |
| 188 | 192 |
| 189 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHostFactory); | 193 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHostFactory); |
| 190 }; | 194 }; |
| 191 | 195 |
| 192 } // namespace content | 196 } // namespace content |
| 193 | 197 |
| 194 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_ | 198 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_ |
| OLD | NEW |