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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 #include "third_party/WebKit/Source/WebKit/chromium/public/WebColorName.h" | 84 #include "third_party/WebKit/Source/WebKit/chromium/public/WebColorName.h" |
85 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDatabase.h" | 85 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDatabase.h" |
86 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" | 86 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" |
87 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" | 87 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
88 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" | 88 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" |
89 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNetworkStateNotifi
er.h" | 89 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNetworkStateNotifi
er.h" |
90 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenu.h" | 90 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenu.h" |
91 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRuntimeFeatures.h" | 91 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRuntimeFeatures.h" |
92 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptController.h
" | 92 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptController.h
" |
93 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h" | 93 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h" |
| 94 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSharedWorkerReposi
tory.h" |
94 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 95 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
95 #include "ui/base/layout.h" | 96 #include "ui/base/layout.h" |
96 #include "ui/base/ui_base_switches.h" | 97 #include "ui/base/ui_base_switches.h" |
97 #include "v8/include/v8.h" | 98 #include "v8/include/v8.h" |
98 #include "webkit/glue/webkit_glue.h" | 99 #include "webkit/glue/webkit_glue.h" |
99 | 100 |
100 // TODO(port) | 101 // TODO(port) |
101 #if !defined(OS_WIN) | 102 #if !defined(OS_WIN) |
102 #include "base/memory/scoped_handle.h" | 103 #include "base/memory/scoped_handle.h" |
103 #include "content/common/np_channel_base.h" | 104 #include "content/common/np_channel_base.h" |
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
561 | 562 |
562 ScheduleIdleHandler(kLongIdleHandlerDelayMs); | 563 ScheduleIdleHandler(kLongIdleHandlerDelayMs); |
563 } | 564 } |
564 | 565 |
565 void RenderThreadImpl::EnsureWebKitInitialized() { | 566 void RenderThreadImpl::EnsureWebKitInitialized() { |
566 if (webkit_platform_support_.get()) | 567 if (webkit_platform_support_.get()) |
567 return; | 568 return; |
568 | 569 |
569 webkit_platform_support_.reset(new RendererWebKitPlatformSupportImpl); | 570 webkit_platform_support_.reset(new RendererWebKitPlatformSupportImpl); |
570 WebKit::initialize(webkit_platform_support_.get()); | 571 WebKit::initialize(webkit_platform_support_.get()); |
| 572 WebKit::setSharedWorkerRepository( |
| 573 webkit_platform_support_.get()->sharedWorkerRepository()); |
571 | 574 |
572 WebKit::WebCompositorSupport* compositor_support = | 575 WebKit::WebCompositorSupport* compositor_support = |
573 WebKit::Platform::current()->compositorSupport(); | 576 WebKit::Platform::current()->compositorSupport(); |
574 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 577 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
575 compositor_support->setAcceleratedAnimationEnabled( | 578 compositor_support->setAcceleratedAnimationEnabled( |
576 !command_line.HasSwitch(switches::kDisableThreadedAnimation)); | 579 !command_line.HasSwitch(switches::kDisableThreadedAnimation)); |
577 compositor_support->setPerTilePaintingEnabled( | 580 compositor_support->setPerTilePaintingEnabled( |
578 command_line.HasSwitch(switches::kEnablePerTilePainting)); | 581 command_line.HasSwitch(switches::kEnablePerTilePainting)); |
579 compositor_support->setPartialSwapEnabled( | 582 compositor_support->setPartialSwapEnabled( |
580 command_line.HasSwitch(switches::kEnablePartialSwap)); | 583 command_line.HasSwitch(switches::kEnablePartialSwap)); |
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1146 | 1149 |
1147 scoped_refptr<base::MessageLoopProxy> | 1150 scoped_refptr<base::MessageLoopProxy> |
1148 RenderThreadImpl::GetFileThreadMessageLoopProxy() { | 1151 RenderThreadImpl::GetFileThreadMessageLoopProxy() { |
1149 DCHECK(message_loop() == MessageLoop::current()); | 1152 DCHECK(message_loop() == MessageLoop::current()); |
1150 if (!file_thread_.get()) { | 1153 if (!file_thread_.get()) { |
1151 file_thread_.reset(new base::Thread("Renderer::FILE")); | 1154 file_thread_.reset(new base::Thread("Renderer::FILE")); |
1152 file_thread_->Start(); | 1155 file_thread_->Start(); |
1153 } | 1156 } |
1154 return file_thread_->message_loop_proxy(); | 1157 return file_thread_->message_loop_proxy(); |
1155 } | 1158 } |
OLD | NEW |