| 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 virtual void SetIdleNotificationDelayInMs( | 159 virtual void SetIdleNotificationDelayInMs( |
| 160 int64 idle_notification_delay_in_ms) OVERRIDE; | 160 int64 idle_notification_delay_in_ms) OVERRIDE; |
| 161 virtual void UpdateHistograms(int sequence_number) OVERRIDE; | 161 virtual void UpdateHistograms(int sequence_number) OVERRIDE; |
| 162 virtual int PostTaskToAllWebWorkers(const base::Closure& closure) OVERRIDE; | 162 virtual int PostTaskToAllWebWorkers(const base::Closure& closure) OVERRIDE; |
| 163 virtual bool ResolveProxy(const GURL& url, std::string* proxy_list) OVERRIDE; | 163 virtual bool ResolveProxy(const GURL& url, std::string* proxy_list) OVERRIDE; |
| 164 virtual base::WaitableEvent* GetShutdownEvent() OVERRIDE; | 164 virtual base::WaitableEvent* GetShutdownEvent() OVERRIDE; |
| 165 #if defined(OS_WIN) | 165 #if defined(OS_WIN) |
| 166 virtual void PreCacheFont(const LOGFONT& log_font) OVERRIDE; | 166 virtual void PreCacheFont(const LOGFONT& log_font) OVERRIDE; |
| 167 virtual void ReleaseCachedFonts() OVERRIDE; | 167 virtual void ReleaseCachedFonts() OVERRIDE; |
| 168 #endif | 168 #endif |
| 169 virtual ServiceRegistry* GetServiceRegistry() OVERRIDE; |
| 169 | 170 |
| 170 // Synchronously establish a channel to the GPU plugin if not previously | 171 // Synchronously establish a channel to the GPU plugin if not previously |
| 171 // established or if it has been lost (for example if the GPU plugin crashed). | 172 // established or if it has been lost (for example if the GPU plugin crashed). |
| 172 // If there is a pending asynchronous request, it will be completed by the | 173 // If there is a pending asynchronous request, it will be completed by the |
| 173 // time this routine returns. | 174 // time this routine returns. |
| 174 GpuChannelHost* EstablishGpuChannelSync(CauseForGpuLaunch); | 175 GpuChannelHost* EstablishGpuChannelSync(CauseForGpuLaunch); |
| 175 | 176 |
| 176 | 177 |
| 177 // These methods modify how the next message is sent. Normally, when sending | 178 // These methods modify how the next message is sent. Normally, when sending |
| 178 // a synchronous message that runs a nested message loop, we need to suspend | 179 // a synchronous message that runs a nested message loop, we need to suspend |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 // Called by a RenderWidget when it is created or destroyed. This | 394 // Called by a RenderWidget when it is created or destroyed. This |
| 394 // allows the process to know when there are no visible widgets. | 395 // allows the process to know when there are no visible widgets. |
| 395 void WidgetCreated(); | 396 void WidgetCreated(); |
| 396 void WidgetDestroyed(); | 397 void WidgetDestroyed(); |
| 397 void WidgetHidden(); | 398 void WidgetHidden(); |
| 398 void WidgetRestored(); | 399 void WidgetRestored(); |
| 399 | 400 |
| 400 void AddEmbeddedWorkerRoute(int32 routing_id, IPC::Listener* listener); | 401 void AddEmbeddedWorkerRoute(int32 routing_id, IPC::Listener* listener); |
| 401 void RemoveEmbeddedWorkerRoute(int32 routing_id); | 402 void RemoveEmbeddedWorkerRoute(int32 routing_id); |
| 402 | 403 |
| 404 void RegisterPendingRenderFrameConnect(int routing_id, |
| 405 mojo::ScopedMessagePipeHandle handle); |
| 406 |
| 403 private: | 407 private: |
| 404 // ChildThread | 408 // ChildThread |
| 405 virtual bool OnControlMessageReceived(const IPC::Message& msg) OVERRIDE; | 409 virtual bool OnControlMessageReceived(const IPC::Message& msg) OVERRIDE; |
| 406 | 410 |
| 407 // GpuChannelHostFactory implementation: | 411 // GpuChannelHostFactory implementation: |
| 408 virtual bool IsMainThread() OVERRIDE; | 412 virtual bool IsMainThread() OVERRIDE; |
| 409 virtual base::MessageLoop* GetMainLoop() OVERRIDE; | 413 virtual base::MessageLoop* GetMainLoop() OVERRIDE; |
| 410 virtual scoped_refptr<base::MessageLoopProxy> GetIOLoopProxy() OVERRIDE; | 414 virtual scoped_refptr<base::MessageLoopProxy> GetIOLoopProxy() OVERRIDE; |
| 411 virtual scoped_ptr<base::SharedMemory> AllocateSharedMemory( | 415 virtual scoped_ptr<base::SharedMemory> AllocateSharedMemory( |
| 412 size_t size) OVERRIDE; | 416 size_t size) OVERRIDE; |
| 413 virtual bool CreateViewCommandBuffer( | 417 virtual bool CreateViewCommandBuffer( |
| 414 int32 surface_id, | 418 int32 surface_id, |
| 415 const GPUCreateCommandBufferConfig& init_params, | 419 const GPUCreateCommandBufferConfig& init_params, |
| 416 int32 route_id) OVERRIDE; | 420 int32 route_id) OVERRIDE; |
| 417 virtual void CreateImage( | 421 virtual void CreateImage( |
| 418 gfx::PluginWindowHandle window, | 422 gfx::PluginWindowHandle window, |
| 419 int32 image_id, | 423 int32 image_id, |
| 420 const CreateImageCallback& callback) OVERRIDE; | 424 const CreateImageCallback& callback) OVERRIDE; |
| 421 virtual void DeleteImage(int32 image_id, int32 sync_point) OVERRIDE; | 425 virtual void DeleteImage(int32 image_id, int32 sync_point) OVERRIDE; |
| 422 virtual scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( | 426 virtual scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( |
| 423 size_t width, | 427 size_t width, |
| 424 size_t height, | 428 size_t height, |
| 425 unsigned internalformat, | 429 unsigned internalformat, |
| 426 unsigned usage) OVERRIDE; | 430 unsigned usage) OVERRIDE; |
| 427 | 431 |
| 428 // mojo::ServiceProvider implementation: | |
| 429 virtual void ConnectToService( | |
| 430 const mojo::String& service_url, | |
| 431 const mojo::String& service_name, | |
| 432 mojo::ScopedMessagePipeHandle message_pipe, | |
| 433 const mojo::String& requestor_url) OVERRIDE; | |
| 434 | |
| 435 void Init(); | 432 void Init(); |
| 436 | 433 |
| 437 void OnSetZoomLevelForCurrentURL(const std::string& scheme, | 434 void OnSetZoomLevelForCurrentURL(const std::string& scheme, |
| 438 const std::string& host, | 435 const std::string& host, |
| 439 double zoom_level); | 436 double zoom_level); |
| 440 void OnCreateNewView(const ViewMsg_New_Params& params); | 437 void OnCreateNewView(const ViewMsg_New_Params& params); |
| 441 void OnTransferBitmap(const SkBitmap& bitmap, int resource_id); | 438 void OnTransferBitmap(const SkBitmap& bitmap, int resource_id); |
| 442 void OnPurgePluginListCache(bool reload_pages); | 439 void OnPurgePluginListCache(bool reload_pages); |
| 443 void OnNetworkTypeChanged(net::NetworkChangeNotifier::ConnectionType type); | 440 void OnNetworkTypeChanged(net::NetworkChangeNotifier::ConnectionType type); |
| 444 void OnGetAccessibilityTree(); | 441 void OnGetAccessibilityTree(); |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 573 // Compositor settings | 570 // Compositor settings |
| 574 bool is_gpu_rasterization_enabled_; | 571 bool is_gpu_rasterization_enabled_; |
| 575 bool is_gpu_rasterization_forced_; | 572 bool is_gpu_rasterization_forced_; |
| 576 bool is_impl_side_painting_enabled_; | 573 bool is_impl_side_painting_enabled_; |
| 577 bool is_low_res_tiling_enabled_; | 574 bool is_low_res_tiling_enabled_; |
| 578 bool is_lcd_text_enabled_; | 575 bool is_lcd_text_enabled_; |
| 579 bool is_distance_field_text_enabled_; | 576 bool is_distance_field_text_enabled_; |
| 580 bool is_zero_copy_enabled_; | 577 bool is_zero_copy_enabled_; |
| 581 bool is_one_copy_enabled_; | 578 bool is_one_copy_enabled_; |
| 582 | 579 |
| 580 std::map<int, mojo::MessagePipeHandle> pending_render_frame_connects_; |
| 581 |
| 583 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); | 582 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); |
| 584 }; | 583 }; |
| 585 | 584 |
| 586 } // namespace content | 585 } // namespace content |
| 587 | 586 |
| 588 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ | 587 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ |
| OLD | NEW |