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 #include "content/renderer/render_thread_impl.h" | 5 #include "content/renderer/render_thread_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <map> | 9 #include <map> |
10 #include <vector> | 10 #include <vector> |
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
730 | 730 |
731 void RenderThreadImpl::EnsureWebKitInitialized() { | 731 void RenderThreadImpl::EnsureWebKitInitialized() { |
732 if (webkit_platform_support_) | 732 if (webkit_platform_support_) |
733 return; | 733 return; |
734 | 734 |
735 webkit_platform_support_.reset(new RendererWebKitPlatformSupportImpl); | 735 webkit_platform_support_.reset(new RendererWebKitPlatformSupportImpl); |
736 blink::initialize(webkit_platform_support_.get()); | 736 blink::initialize(webkit_platform_support_.get()); |
737 | 737 |
738 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 738 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
739 | 739 |
740 bool enable = !command_line.HasSwitch(switches::kDisableThreadedCompositing); | 740 bool enable = command_line.HasSwitch(switches::kEnableThreadedCompositing); |
741 if (enable) { | 741 if (enable) { |
742 #if defined(OS_ANDROID) | 742 #if defined(OS_ANDROID) |
743 if (SynchronousCompositorFactory* factory = | 743 if (SynchronousCompositorFactory* factory = |
744 SynchronousCompositorFactory::GetInstance()) | 744 SynchronousCompositorFactory::GetInstance()) |
745 compositor_message_loop_proxy_ = | 745 compositor_message_loop_proxy_ = |
746 factory->GetCompositorMessageLoop(); | 746 factory->GetCompositorMessageLoop(); |
747 #endif | 747 #endif |
748 if (!compositor_message_loop_proxy_.get()) { | 748 if (!compositor_message_loop_proxy_.get()) { |
749 compositor_thread_.reset(new base::Thread("Compositor")); | 749 compositor_thread_.reset(new base::Thread("Compositor")); |
750 compositor_thread_->Start(); | 750 compositor_thread_->Start(); |
(...skipping 763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1514 hidden_widget_count_--; | 1514 hidden_widget_count_--; |
1515 | 1515 |
1516 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { | 1516 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { |
1517 return; | 1517 return; |
1518 } | 1518 } |
1519 | 1519 |
1520 ScheduleIdleHandler(kLongIdleHandlerDelayMs); | 1520 ScheduleIdleHandler(kLongIdleHandlerDelayMs); |
1521 } | 1521 } |
1522 | 1522 |
1523 } // namespace content | 1523 } // namespace content |
OLD | NEW |