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_RENDERER_RENDER_THREAD_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ |
6 #define CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ | 6 #define CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 OVERRIDE; | 125 OVERRIDE; |
126 virtual void AddRoute(int32 routing_id, IPC::Listener* listener) OVERRIDE; | 126 virtual void AddRoute(int32 routing_id, IPC::Listener* listener) OVERRIDE; |
127 virtual void RemoveRoute(int32 routing_id) OVERRIDE; | 127 virtual void RemoveRoute(int32 routing_id) OVERRIDE; |
128 virtual int GenerateRoutingID() OVERRIDE; | 128 virtual int GenerateRoutingID() OVERRIDE; |
129 virtual void AddFilter(IPC::ChannelProxy::MessageFilter* filter) OVERRIDE; | 129 virtual void AddFilter(IPC::ChannelProxy::MessageFilter* filter) OVERRIDE; |
130 virtual void RemoveFilter(IPC::ChannelProxy::MessageFilter* filter) OVERRIDE; | 130 virtual void RemoveFilter(IPC::ChannelProxy::MessageFilter* filter) OVERRIDE; |
131 virtual void AddObserver(RenderProcessObserver* observer) OVERRIDE; | 131 virtual void AddObserver(RenderProcessObserver* observer) OVERRIDE; |
132 virtual void RemoveObserver(RenderProcessObserver* observer) OVERRIDE; | 132 virtual void RemoveObserver(RenderProcessObserver* observer) OVERRIDE; |
133 virtual void SetResourceDispatcherDelegate( | 133 virtual void SetResourceDispatcherDelegate( |
134 ResourceDispatcherDelegate* delegate) OVERRIDE; | 134 ResourceDispatcherDelegate* delegate) OVERRIDE; |
135 virtual void WidgetHidden() OVERRIDE; | |
136 virtual void WidgetRestored() OVERRIDE; | |
137 virtual void EnsureWebKitInitialized() OVERRIDE; | 135 virtual void EnsureWebKitInitialized() OVERRIDE; |
138 virtual void RecordAction(const UserMetricsAction& action) OVERRIDE; | 136 virtual void RecordAction(const UserMetricsAction& action) OVERRIDE; |
139 virtual void RecordComputedAction(const std::string& action) OVERRIDE; | 137 virtual void RecordComputedAction(const std::string& action) OVERRIDE; |
140 virtual scoped_ptr<base::SharedMemory> HostAllocateSharedMemoryBuffer( | 138 virtual scoped_ptr<base::SharedMemory> HostAllocateSharedMemoryBuffer( |
141 size_t buffer_size) OVERRIDE; | 139 size_t buffer_size) OVERRIDE; |
142 virtual void RegisterExtension(v8::Extension* extension) OVERRIDE; | 140 virtual void RegisterExtension(v8::Extension* extension) OVERRIDE; |
143 virtual void ScheduleIdleHandler(int64 initial_delay_ms) OVERRIDE; | 141 virtual void ScheduleIdleHandler(int64 initial_delay_ms) OVERRIDE; |
144 virtual void IdleHandler() OVERRIDE; | 142 virtual void IdleHandler() OVERRIDE; |
145 virtual int64 GetIdleNotificationDelayInMs() const OVERRIDE; | 143 virtual int64 GetIdleNotificationDelayInMs() const OVERRIDE; |
146 virtual void SetIdleNotificationDelayInMs( | 144 virtual void SetIdleNotificationDelayInMs( |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 const std::vector<float>& new_touchscreen); | 336 const std::vector<float>& new_touchscreen); |
339 | 337 |
340 // Retrieve current gamepad data. | 338 // Retrieve current gamepad data. |
341 void SampleGamepads(blink::WebGamepads* data); | 339 void SampleGamepads(blink::WebGamepads* data); |
342 | 340 |
343 // Get the browser process's notion of the renderer process's ID. | 341 // Get the browser process's notion of the renderer process's ID. |
344 // This is the first argument to RenderWidgetHost::FromID. Ideally | 342 // This is the first argument to RenderWidgetHost::FromID. Ideally |
345 // this would be available on all platforms via base::Process. | 343 // this would be available on all platforms via base::Process. |
346 base::ProcessId renderer_process_id() const; | 344 base::ProcessId renderer_process_id() const; |
347 | 345 |
| 346 // Called by a RenderWidget when it is created or destroyed. This |
| 347 // allows the process to know when there are no visible widgets. |
| 348 void WidgetCreated(); |
| 349 void WidgetDestroyed(); |
| 350 void WidgetHidden(); |
| 351 void WidgetRestored(); |
| 352 |
348 private: | 353 private: |
349 // ChildThread | 354 // ChildThread |
350 virtual bool OnControlMessageReceived(const IPC::Message& msg) OVERRIDE; | 355 virtual bool OnControlMessageReceived(const IPC::Message& msg) OVERRIDE; |
351 | 356 |
352 // GpuChannelHostFactory implementation: | 357 // GpuChannelHostFactory implementation: |
353 virtual bool IsMainThread() OVERRIDE; | 358 virtual bool IsMainThread() OVERRIDE; |
354 virtual base::MessageLoop* GetMainLoop() OVERRIDE; | 359 virtual base::MessageLoop* GetMainLoop() OVERRIDE; |
355 virtual scoped_refptr<base::MessageLoopProxy> GetIOLoopProxy() OVERRIDE; | 360 virtual scoped_refptr<base::MessageLoopProxy> GetIOLoopProxy() OVERRIDE; |
356 virtual base::WaitableEvent* GetShutDownEvent() OVERRIDE; | 361 virtual base::WaitableEvent* GetShutDownEvent() OVERRIDE; |
357 virtual scoped_ptr<base::SharedMemory> AllocateSharedMemory( | 362 virtual scoped_ptr<base::SharedMemory> AllocateSharedMemory( |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
500 // multiple threads. Current allocation mechanism for IOSurface | 505 // multiple threads. Current allocation mechanism for IOSurface |
501 // backed GpuMemoryBuffers prevent this. crbug.com/325045 | 506 // backed GpuMemoryBuffers prevent this. crbug.com/325045 |
502 base::ThreadChecker allocate_gpu_memory_buffer_thread_checker_; | 507 base::ThreadChecker allocate_gpu_memory_buffer_thread_checker_; |
503 | 508 |
504 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); | 509 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); |
505 }; | 510 }; |
506 | 511 |
507 } // namespace content | 512 } // namespace content |
508 | 513 |
509 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ | 514 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ |
OLD | NEW |