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 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "chrome/browser/renderer_host/render_process_host.h" | 9 #include "chrome/browser/renderer_host/render_process_host.h" |
10 #include "chrome/common/ipc_test_sink.h" | 10 #include "chrome/common/ipc_test_sink.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 // renderer via this RenderProcessHost. | 23 // renderer via this RenderProcessHost. |
24 IPC::TestSink& sink() { return sink_; } | 24 IPC::TestSink& sink() { return sink_; } |
25 | 25 |
26 // Provides tests access to the max page ID currently used for this process. | 26 // Provides tests access to the max page ID currently used for this process. |
27 int max_page_id() const { return max_page_id_; } | 27 int max_page_id() const { return max_page_id_; } |
28 | 28 |
29 // Provides test access to how many times a bad message has been received. | 29 // Provides test access to how many times a bad message has been received. |
30 int bad_msg_count() const { return bad_msg_count_; } | 30 int bad_msg_count() const { return bad_msg_count_; } |
31 | 31 |
32 // RenderProcessHost implementation (public portion). | 32 // RenderProcessHost implementation (public portion). |
33 virtual bool Init(bool is_extensions_process, | 33 virtual bool Init(bool is_extensions_process); |
34 URLRequestContextGetter* request_context); | |
35 virtual int GetNextRoutingID(); | 34 virtual int GetNextRoutingID(); |
36 virtual void CancelResourceRequests(int render_widget_id); | 35 virtual void CancelResourceRequests(int render_widget_id); |
37 virtual void CrossSiteClosePageACK(const ViewMsg_ClosePage_Params& params); | 36 virtual void CrossSiteClosePageACK(const ViewMsg_ClosePage_Params& params); |
38 virtual bool WaitForUpdateMsg(int render_widget_id, | 37 virtual bool WaitForUpdateMsg(int render_widget_id, |
39 const base::TimeDelta& max_delay, | 38 const base::TimeDelta& max_delay, |
40 IPC::Message* msg); | 39 IPC::Message* msg); |
41 virtual void ReceivedBadMessage(uint32 msg_type); | 40 virtual void ReceivedBadMessage(uint32 msg_type); |
42 virtual void WidgetRestored(); | 41 virtual void WidgetRestored(); |
43 virtual void WidgetHidden(); | 42 virtual void WidgetHidden(); |
44 virtual void ViewCreated(); | 43 virtual void ViewCreated(); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 virtual RenderProcessHost* CreateRenderProcessHost( | 78 virtual RenderProcessHost* CreateRenderProcessHost( |
80 Profile* profile) const { | 79 Profile* profile) const { |
81 return new MockRenderProcessHost(profile); | 80 return new MockRenderProcessHost(profile); |
82 } | 81 } |
83 | 82 |
84 private: | 83 private: |
85 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHostFactory); | 84 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHostFactory); |
86 }; | 85 }; |
87 | 86 |
88 #endif // CHROME_BROWSER_RENDERER_HOST_MOCK_RENDER_PROCESS_HOST_H_ | 87 #endif // CHROME_BROWSER_RENDERER_HOST_MOCK_RENDER_PROCESS_HOST_H_ |
OLD | NEW |