| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <queue> | 10 #include <queue> |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 // base::WaitableEventWatcher::Delegate implementation. | 108 // base::WaitableEventWatcher::Delegate implementation. |
| 109 virtual void OnWaitableEventSignaled( | 109 virtual void OnWaitableEventSignaled( |
| 110 base::WaitableEvent* waitable_event) OVERRIDE; | 110 base::WaitableEvent* waitable_event) OVERRIDE; |
| 111 | 111 |
| 112 // Call this function when it is evident that the child process is actively | 112 // Call this function when it is evident that the child process is actively |
| 113 // performing some operation, for example if we just received an IPC message. | 113 // performing some operation, for example if we just received an IPC message. |
| 114 void mark_child_process_activity_time() { | 114 void mark_child_process_activity_time() { |
| 115 child_process_activity_time_ = base::TimeTicks::Now(); | 115 child_process_activity_time_ = base::TimeTicks::Now(); |
| 116 } | 116 } |
| 117 | 117 |
| 118 // Register/unregister the host identified by the host id in the global host |
| 119 // list. |
| 120 static void RegisterHost(int host_id, content::RenderProcessHost* host); |
| 121 static void UnregisterHost(int host_id); |
| 122 |
| 118 protected: | 123 protected: |
| 119 // A proxy for our IPC::Channel that lives on the IO thread (see | 124 // A proxy for our IPC::Channel that lives on the IO thread (see |
| 120 // browser_process.h) | 125 // browser_process.h) |
| 121 scoped_ptr<IPC::ChannelProxy> channel_; | 126 scoped_ptr<IPC::ChannelProxy> channel_; |
| 122 | 127 |
| 123 // The registered listeners. When this list is empty or all NULL, we should | 128 // The registered listeners. When this list is empty or all NULL, we should |
| 124 // delete ourselves | 129 // delete ourselves |
| 125 IDMap<IPC::Channel::Listener> listeners_; | 130 IDMap<IPC::Channel::Listener> listeners_; |
| 126 | 131 |
| 127 // The maximum page ID we've ever seen from the renderer process. | 132 // The maximum page ID we've ever seen from the renderer process. |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 // filtering for this at the render widget level. | 248 // filtering for this at the render widget level. |
| 244 bool ignore_input_events_; | 249 bool ignore_input_events_; |
| 245 | 250 |
| 246 // Records the last time we regarded the child process active. | 251 // Records the last time we regarded the child process active. |
| 247 base::TimeTicks child_process_activity_time_; | 252 base::TimeTicks child_process_activity_time_; |
| 248 | 253 |
| 249 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); | 254 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); |
| 250 }; | 255 }; |
| 251 | 256 |
| 252 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ | 257 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ |
| OLD | NEW |