| 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 27 matching lines...) Expand all Loading... |
| 38 IPC::TestSink& sink() { return sink_; } | 38 IPC::TestSink& sink() { return sink_; } |
| 39 | 39 |
| 40 // Provides test access to how many times a bad message has been received. | 40 // Provides test access to how many times a bad message has been received. |
| 41 int bad_msg_count() const { return bad_msg_count_; } | 41 int bad_msg_count() const { return bad_msg_count_; } |
| 42 | 42 |
| 43 // Provides tests a way to simulate this render process crashing. | 43 // Provides tests a way to simulate this render process crashing. |
| 44 void SimulateCrash(); | 44 void SimulateCrash(); |
| 45 | 45 |
| 46 // RenderProcessHost implementation (public portion). | 46 // RenderProcessHost implementation (public portion). |
| 47 bool Init() override; | 47 bool Init() override; |
| 48 void EnsureHasChannel() override; |
| 48 int GetNextRoutingID() override; | 49 int GetNextRoutingID() override; |
| 49 void AddRoute(int32_t routing_id, IPC::Listener* listener) override; | 50 void AddRoute(int32_t routing_id, IPC::Listener* listener) override; |
| 50 void RemoveRoute(int32_t routing_id) override; | 51 void RemoveRoute(int32_t routing_id) override; |
| 51 void AddObserver(RenderProcessHostObserver* observer) override; | 52 void AddObserver(RenderProcessHostObserver* observer) override; |
| 52 void RemoveObserver(RenderProcessHostObserver* observer) override; | 53 void RemoveObserver(RenderProcessHostObserver* observer) override; |
| 53 void ShutdownForBadMessage(CrashReportMode crash_report_mode) override; | 54 void ShutdownForBadMessage(CrashReportMode crash_report_mode) override; |
| 54 void WidgetRestored() override; | 55 void WidgetRestored() override; |
| 55 void WidgetHidden() override; | 56 void WidgetHidden() override; |
| 56 int VisibleWidgetCount() const override; | 57 int VisibleWidgetCount() const override; |
| 57 void AudioStateChanged() override; | 58 void AudioStateChanged() override; |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 // for deleting all MockRenderProcessHosts that have not deleted by a test in | 188 // for deleting all MockRenderProcessHosts that have not deleted by a test in |
| 188 // the destructor and prevent them from being leaked. | 189 // the destructor and prevent them from being leaked. |
| 189 mutable ScopedVector<MockRenderProcessHost> processes_; | 190 mutable ScopedVector<MockRenderProcessHost> processes_; |
| 190 | 191 |
| 191 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHostFactory); | 192 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHostFactory); |
| 192 }; | 193 }; |
| 193 | 194 |
| 194 } // namespace content | 195 } // namespace content |
| 195 | 196 |
| 196 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_ | 197 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_ |
| OLD | NEW |