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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 bool Init() override; | 40 bool Init() override; |
41 int GetNextRoutingID() override; | 41 int GetNextRoutingID() override; |
42 void AddRoute(int32 routing_id, IPC::Listener* listener) override; | 42 void AddRoute(int32 routing_id, IPC::Listener* listener) override; |
43 void RemoveRoute(int32 routing_id) override; | 43 void RemoveRoute(int32 routing_id) override; |
44 void AddObserver(RenderProcessHostObserver* observer) override; | 44 void AddObserver(RenderProcessHostObserver* observer) override; |
45 void RemoveObserver(RenderProcessHostObserver* observer) override; | 45 void RemoveObserver(RenderProcessHostObserver* observer) override; |
46 void ShutdownForBadMessage() override; | 46 void ShutdownForBadMessage() override; |
47 void WidgetRestored() override; | 47 void WidgetRestored() override; |
48 void WidgetHidden() override; | 48 void WidgetHidden() override; |
49 int VisibleWidgetCount() const override; | 49 int VisibleWidgetCount() const override; |
| 50 void AudioStateChanged() override; |
50 bool IsForGuestsOnly() const override; | 51 bool IsForGuestsOnly() const override; |
51 StoragePartition* GetStoragePartition() const override; | 52 StoragePartition* GetStoragePartition() const override; |
52 virtual void AddWord(const base::string16& word); | 53 virtual void AddWord(const base::string16& word); |
53 bool Shutdown(int exit_code, bool wait) override; | 54 bool Shutdown(int exit_code, bool wait) override; |
54 bool FastShutdownIfPossible() override; | 55 bool FastShutdownIfPossible() override; |
55 bool FastShutdownStarted() const override; | 56 bool FastShutdownStarted() const override; |
56 base::ProcessHandle GetHandle() const override; | 57 base::ProcessHandle GetHandle() const override; |
57 int GetID() const override; | 58 int GetID() const override; |
58 bool HasConnection() const override; | 59 bool HasConnection() const override; |
59 void SetIgnoreInputEvents(bool ignore_input_events) override; | 60 void SetIgnoreInputEvents(bool ignore_input_events) override; |
(...skipping 28 matching lines...) Expand all Loading... |
88 bool SubscribeUniformEnabled() const override; | 89 bool SubscribeUniformEnabled() const override; |
89 void OnAddSubscription(unsigned int target) override; | 90 void OnAddSubscription(unsigned int target) override; |
90 void OnRemoveSubscription(unsigned int target) override; | 91 void OnRemoveSubscription(unsigned int target) override; |
91 void SendUpdateValueState( | 92 void SendUpdateValueState( |
92 unsigned int target, const gpu::ValueState& state) override; | 93 unsigned int target, const gpu::ValueState& state) override; |
93 #if defined(ENABLE_BROWSER_CDMS) | 94 #if defined(ENABLE_BROWSER_CDMS) |
94 media::BrowserCdm* GetBrowserCdm(int render_frame_id, | 95 media::BrowserCdm* GetBrowserCdm(int render_frame_id, |
95 int cdm_id) const override; | 96 int cdm_id) const override; |
96 #endif | 97 #endif |
97 | 98 |
| 99 #if defined(OS_MACOSX) |
| 100 mach_port_t GetMachTaskPortForTesting() const override; |
| 101 #endif |
| 102 |
98 // IPC::Sender via RenderProcessHost. | 103 // IPC::Sender via RenderProcessHost. |
99 bool Send(IPC::Message* msg) override; | 104 bool Send(IPC::Message* msg) override; |
100 | 105 |
101 // IPC::Listener via RenderProcessHost. | 106 // IPC::Listener via RenderProcessHost. |
102 bool OnMessageReceived(const IPC::Message& msg) override; | 107 bool OnMessageReceived(const IPC::Message& msg) override; |
103 void OnChannelConnected(int32 peer_pid) override; | 108 void OnChannelConnected(int32 peer_pid) override; |
104 | 109 |
105 // Attaches the factory object so we can remove this object in its destructor | 110 // Attaches the factory object so we can remove this object in its destructor |
106 // and prevent MockRenderProcessHostFacotry from deleting it. | 111 // and prevent MockRenderProcessHostFacotry from deleting it. |
107 void SetFactory(const MockRenderProcessHostFactory* factory) { | 112 void SetFactory(const MockRenderProcessHostFactory* factory) { |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 // for deleting all MockRenderProcessHosts that have not deleted by a test in | 164 // for deleting all MockRenderProcessHosts that have not deleted by a test in |
160 // the destructor and prevent them from being leaked. | 165 // the destructor and prevent them from being leaked. |
161 mutable ScopedVector<MockRenderProcessHost> processes_; | 166 mutable ScopedVector<MockRenderProcessHost> processes_; |
162 | 167 |
163 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHostFactory); | 168 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHostFactory); |
164 }; | 169 }; |
165 | 170 |
166 } // namespace content | 171 } // namespace content |
167 | 172 |
168 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_ | 173 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_ |
OLD | NEW |