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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 // WidgetRestored is called before WidgetDestroyed for any hidden widget. | 447 // WidgetRestored is called before WidgetDestroyed for any hidden widget. |
448 void WidgetDestroyed(); | 448 void WidgetDestroyed(); |
449 void WidgetHidden(); | 449 void WidgetHidden(); |
450 void WidgetRestored(); | 450 void WidgetRestored(); |
451 | 451 |
452 void AddEmbeddedWorkerRoute(int32_t routing_id, IPC::Listener* listener); | 452 void AddEmbeddedWorkerRoute(int32_t routing_id, IPC::Listener* listener); |
453 void RemoveEmbeddedWorkerRoute(int32_t routing_id); | 453 void RemoveEmbeddedWorkerRoute(int32_t routing_id); |
454 | 454 |
455 void RegisterPendingRenderFrameConnect( | 455 void RegisterPendingRenderFrameConnect( |
456 int routing_id, | 456 int routing_id, |
457 mojo::shell::mojom::InterfaceProviderRequest services, | 457 shell::mojom::InterfaceProviderRequest services, |
458 mojo::shell::mojom::InterfaceProviderPtr exposed_services); | 458 shell::mojom::InterfaceProviderPtr exposed_services); |
459 | 459 |
460 mojom::StoragePartitionService* GetStoragePartitionService(); | 460 mojom::StoragePartitionService* GetStoragePartitionService(); |
461 | 461 |
462 protected: | 462 protected: |
463 RenderThreadImpl( | 463 RenderThreadImpl( |
464 const InProcessChildThreadParams& params, | 464 const InProcessChildThreadParams& params, |
465 std::unique_ptr<scheduler::RendererScheduler> scheduler, | 465 std::unique_ptr<scheduler::RendererScheduler> scheduler, |
466 scoped_refptr<base::SingleThreadTaskRunner>& resource_task_queue); | 466 scoped_refptr<base::SingleThreadTaskRunner>& resource_task_queue); |
467 RenderThreadImpl(std::unique_ptr<base::MessageLoop> main_message_loop, | 467 RenderThreadImpl(std::unique_ptr<base::MessageLoop> main_message_loop, |
468 std::unique_ptr<scheduler::RendererScheduler> scheduler); | 468 std::unique_ptr<scheduler::RendererScheduler> scheduler); |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
679 std::vector<unsigned> use_image_texture_targets_; | 679 std::vector<unsigned> use_image_texture_targets_; |
680 std::vector<unsigned> use_video_frame_image_texture_targets_; | 680 std::vector<unsigned> use_video_frame_image_texture_targets_; |
681 bool are_image_decode_tasks_enabled_; | 681 bool are_image_decode_tasks_enabled_; |
682 bool is_threaded_animation_enabled_; | 682 bool is_threaded_animation_enabled_; |
683 | 683 |
684 class PendingRenderFrameConnect | 684 class PendingRenderFrameConnect |
685 : public base::RefCounted<PendingRenderFrameConnect> { | 685 : public base::RefCounted<PendingRenderFrameConnect> { |
686 public: | 686 public: |
687 PendingRenderFrameConnect( | 687 PendingRenderFrameConnect( |
688 int routing_id, | 688 int routing_id, |
689 mojo::shell::mojom::InterfaceProviderRequest services, | 689 shell::mojom::InterfaceProviderRequest services, |
690 mojo::shell::mojom::InterfaceProviderPtr exposed_services); | 690 shell::mojom::InterfaceProviderPtr exposed_services); |
691 | 691 |
692 mojo::shell::mojom::InterfaceProviderRequest& services() { | 692 shell::mojom::InterfaceProviderRequest& services() { return services_; } |
693 return services_; | |
694 } | |
695 | 693 |
696 mojo::shell::mojom::InterfaceProviderPtr& exposed_services() { | 694 shell::mojom::InterfaceProviderPtr& exposed_services() { |
697 return exposed_services_; | 695 return exposed_services_; |
698 } | 696 } |
699 | 697 |
700 private: | 698 private: |
701 friend class base::RefCounted<PendingRenderFrameConnect>; | 699 friend class base::RefCounted<PendingRenderFrameConnect>; |
702 | 700 |
703 ~PendingRenderFrameConnect(); | 701 ~PendingRenderFrameConnect(); |
704 | 702 |
705 // Mojo error handler. | 703 // Mojo error handler. |
706 void OnConnectionError(); | 704 void OnConnectionError(); |
707 | 705 |
708 int routing_id_; | 706 int routing_id_; |
709 mojo::shell::mojom::InterfaceProviderRequest services_; | 707 shell::mojom::InterfaceProviderRequest services_; |
710 mojo::shell::mojom::InterfaceProviderPtr exposed_services_; | 708 shell::mojom::InterfaceProviderPtr exposed_services_; |
711 }; | 709 }; |
712 | 710 |
713 typedef std::map<int, scoped_refptr<PendingRenderFrameConnect>> | 711 typedef std::map<int, scoped_refptr<PendingRenderFrameConnect>> |
714 PendingRenderFrameConnectMap; | 712 PendingRenderFrameConnectMap; |
715 PendingRenderFrameConnectMap pending_render_frame_connects_; | 713 PendingRenderFrameConnectMap pending_render_frame_connects_; |
716 | 714 |
717 mojom::StoragePartitionServicePtr storage_partition_service_; | 715 mojom::StoragePartitionServicePtr storage_partition_service_; |
718 | 716 |
719 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); | 717 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); |
720 }; | 718 }; |
721 | 719 |
722 #if defined(COMPILER_MSVC) | 720 #if defined(COMPILER_MSVC) |
723 #pragma warning(pop) | 721 #pragma warning(pop) |
724 #endif | 722 #endif |
725 | 723 |
726 } // namespace content | 724 } // namespace content |
727 | 725 |
728 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ | 726 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ |
OLD | NEW |