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_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/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 virtual void AddPendingView() OVERRIDE; | 60 virtual void AddPendingView() OVERRIDE; |
61 virtual void RemovePendingView() OVERRIDE; | 61 virtual void RemovePendingView() OVERRIDE; |
62 virtual void SetSuddenTerminationAllowed(bool allowed) OVERRIDE; | 62 virtual void SetSuddenTerminationAllowed(bool allowed) OVERRIDE; |
63 virtual bool SuddenTerminationAllowed() const OVERRIDE; | 63 virtual bool SuddenTerminationAllowed() const OVERRIDE; |
64 virtual IPC::Channel::Listener* GetListenerByID(int routing_id) OVERRIDE; | 64 virtual IPC::Channel::Listener* GetListenerByID(int routing_id) OVERRIDE; |
65 virtual content::BrowserContext* GetBrowserContext() const OVERRIDE; | 65 virtual content::BrowserContext* GetBrowserContext() const OVERRIDE; |
66 virtual IPC::ChannelProxy* GetChannel() OVERRIDE; | 66 virtual IPC::ChannelProxy* GetChannel() OVERRIDE; |
67 virtual listeners_iterator ListenersIterator() OVERRIDE; | 67 virtual listeners_iterator ListenersIterator() OVERRIDE; |
68 virtual bool FastShutdownForPageCount(size_t count) OVERRIDE; | 68 virtual bool FastShutdownForPageCount(size_t count) OVERRIDE; |
69 virtual base::TimeDelta GetChildProcessIdleTime() const OVERRIDE; | 69 virtual base::TimeDelta GetChildProcessIdleTime() const OVERRIDE; |
| 70 virtual bool TerminateOnUnresponsiveAllowed() const OVERRIDE; |
70 | 71 |
71 // IPC::Channel::Sender via RenderProcessHost. | 72 // IPC::Channel::Sender via RenderProcessHost. |
72 virtual bool Send(IPC::Message* msg) OVERRIDE; | 73 virtual bool Send(IPC::Message* msg) OVERRIDE; |
73 | 74 |
74 // IPC::Channel::Listener via RenderProcessHost. | 75 // IPC::Channel::Listener via RenderProcessHost. |
75 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 76 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
76 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; | 77 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; |
77 | 78 |
78 // Attaches the factory object so we can remove this object in its destructor | 79 // Attaches the factory object so we can remove this object in its destructor |
79 // and prevent MockRenderProcessHostFacotry from deleting it. | 80 // and prevent MockRenderProcessHostFacotry from deleting it. |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 private: | 113 private: |
113 // A list of MockRenderProcessHosts created by this object. This list is used | 114 // A list of MockRenderProcessHosts created by this object. This list is used |
114 // for deleting all MockRenderProcessHosts that have not deleted by a test in | 115 // for deleting all MockRenderProcessHosts that have not deleted by a test in |
115 // the destructor and prevent them from being leaked. | 116 // the destructor and prevent them from being leaked. |
116 mutable ScopedVector<MockRenderProcessHost> processes_; | 117 mutable ScopedVector<MockRenderProcessHost> processes_; |
117 | 118 |
118 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHostFactory); | 119 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHostFactory); |
119 }; | 120 }; |
120 | 121 |
121 #endif // CONTENT_BROWSER_RENDERER_HOST_MOCK_RENDER_PROCESS_HOST_H_ | 122 #endif // CONTENT_BROWSER_RENDERER_HOST_MOCK_RENDER_PROCESS_HOST_H_ |
OLD | NEW |