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 CONTENT_BROWSER_RENDERER_HOST_MOCK_RENDER_PROCESS_HOST_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MOCK_RENDER_PROCESS_HOST_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_MOCK_RENDER_PROCESS_HOST_H_ | 6 #define CONTENT_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, |
| 37 bool is_extensions_process, |
| 38 const Extension* installed_app); |
37 virtual int GetNextRoutingID(); | 39 virtual int GetNextRoutingID(); |
38 virtual void CancelResourceRequests(int render_widget_id); | 40 virtual void CancelResourceRequests(int render_widget_id); |
39 virtual void CrossSiteClosePageACK(const ViewMsg_ClosePage_Params& params); | 41 virtual void CrossSiteClosePageACK(const ViewMsg_ClosePage_Params& params); |
40 virtual bool WaitForUpdateMsg(int render_widget_id, | 42 virtual bool WaitForUpdateMsg(int render_widget_id, |
41 const base::TimeDelta& max_delay, | 43 const base::TimeDelta& max_delay, |
42 IPC::Message* msg); | 44 IPC::Message* msg); |
43 virtual void ReceivedBadMessage(); | 45 virtual void ReceivedBadMessage(); |
44 virtual void WidgetRestored(); | 46 virtual void WidgetRestored(); |
45 virtual void WidgetHidden(); | 47 virtual void WidgetHidden(); |
46 virtual void ViewCreated(); | 48 virtual void ViewCreated(); |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 private: | 95 private: |
94 // A list of MockRenderProcessHosts created by this object. This list is used | 96 // 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 | 97 // for deleting all MockRenderProcessHosts that have not deleted by a test in |
96 // the destructor and prevent them from being leaked. | 98 // the destructor and prevent them from being leaked. |
97 mutable ScopedVector<MockRenderProcessHost> processes_; | 99 mutable ScopedVector<MockRenderProcessHost> processes_; |
98 | 100 |
99 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHostFactory); | 101 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHostFactory); |
100 }; | 102 }; |
101 | 103 |
102 #endif // CONTENT_BROWSER_RENDERER_HOST_MOCK_RENDER_PROCESS_HOST_H_ | 104 #endif // CONTENT_BROWSER_RENDERER_HOST_MOCK_RENDER_PROCESS_HOST_H_ |
OLD | NEW |