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" |
(...skipping 15 matching lines...) Expand all Loading... |
26 // renderer via this RenderProcessHost. | 26 // renderer via this RenderProcessHost. |
27 IPC::TestSink& sink() { return sink_; } | 27 IPC::TestSink& sink() { return sink_; } |
28 | 28 |
29 // Provides tests access to the max page ID currently used for this process. | 29 // Provides tests access to the max page ID currently used for this process. |
30 int max_page_id() const { return max_page_id_; } | 30 int max_page_id() const { return max_page_id_; } |
31 | 31 |
32 // Provides test access to how many times a bad message has been received. | 32 // Provides test access to how many times a bad message has been received. |
33 int bad_msg_count() const { return bad_msg_count_; } | 33 int bad_msg_count() const { return bad_msg_count_; } |
34 | 34 |
35 // RenderProcessHost implementation (public portion). | 35 // RenderProcessHost implementation (public portion). |
36 virtual bool Init(bool is_accessibility_enabled, bool is_extensions_process); | 36 virtual bool Init(bool is_accessibility_enabled, bool is_extensions_process, |
| 37 const Extension* installed_app); |
37 virtual int GetNextRoutingID(); | 38 virtual int GetNextRoutingID(); |
38 virtual void CancelResourceRequests(int render_widget_id); | 39 virtual void CancelResourceRequests(int render_widget_id); |
39 virtual void CrossSiteClosePageACK(const ViewMsg_ClosePage_Params& params); | 40 virtual void CrossSiteClosePageACK(const ViewMsg_ClosePage_Params& params); |
40 virtual bool WaitForUpdateMsg(int render_widget_id, | 41 virtual bool WaitForUpdateMsg(int render_widget_id, |
41 const base::TimeDelta& max_delay, | 42 const base::TimeDelta& max_delay, |
42 IPC::Message* msg); | 43 IPC::Message* msg); |
43 virtual void ReceivedBadMessage(); | 44 virtual void ReceivedBadMessage(); |
44 virtual void WidgetRestored(); | 45 virtual void WidgetRestored(); |
45 virtual void WidgetHidden(); | 46 virtual void WidgetHidden(); |
46 virtual void ViewCreated(); | 47 virtual void ViewCreated(); |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 private: | 94 private: |
94 // A list of MockRenderProcessHosts created by this object. This list is used | 95 // 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 | 96 // for deleting all MockRenderProcessHosts that have not deleted by a test in |
96 // the destructor and prevent them from being leaked. | 97 // the destructor and prevent them from being leaked. |
97 mutable ScopedVector<MockRenderProcessHost> processes_; | 98 mutable ScopedVector<MockRenderProcessHost> processes_; |
98 | 99 |
99 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHostFactory); | 100 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHostFactory); |
100 }; | 101 }; |
101 | 102 |
102 #endif // CHROME_BROWSER_RENDERER_HOST_MOCK_RENDER_PROCESS_HOST_H_ | 103 #endif // CHROME_BROWSER_RENDERER_HOST_MOCK_RENDER_PROCESS_HOST_H_ |
OLD | NEW |