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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 #include "media/base/media_switches.h" | 76 #include "media/base/media_switches.h" |
77 #include "net/base/net_errors.h" | 77 #include "net/base/net_errors.h" |
78 #include "net/base/net_util.h" | 78 #include "net/base/net_util.h" |
79 #include "third_party/WebKit/Source/Platform/chromium/public/Platform.h" | 79 #include "third_party/WebKit/Source/Platform/chromium/public/Platform.h" |
80 #include "third_party/WebKit/Source/Platform/chromium/public/WebCompositorSuppor
t.h" | 80 #include "third_party/WebKit/Source/Platform/chromium/public/WebCompositorSuppor
t.h" |
81 #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" | 81 #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" |
82 #include "third_party/WebKit/Source/WebKit/chromium/public/WebColorName.h" | 82 #include "third_party/WebKit/Source/WebKit/chromium/public/WebColorName.h" |
83 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDatabase.h" | 83 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDatabase.h" |
84 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" | 84 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" |
85 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" | 85 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
| 86 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBFactory.h" |
86 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" | 87 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" |
87 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNetworkStateNotifi
er.h" | 88 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNetworkStateNotifi
er.h" |
88 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenu.h" | 89 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenu.h" |
89 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRuntimeFeatures.h" | 90 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRuntimeFeatures.h" |
90 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptController.h
" | 91 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptController.h
" |
91 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h" | 92 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h" |
92 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSharedWorkerReposi
tory.h" | 93 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSharedWorkerReposi
tory.h" |
93 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 94 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
94 #include "ui/base/layout.h" | 95 #include "ui/base/layout.h" |
95 #include "ui/base/ui_base_switches.h" | 96 #include "ui/base/ui_base_switches.h" |
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
577 } | 578 } |
578 | 579 |
579 void RenderThreadImpl::EnsureWebKitInitialized() { | 580 void RenderThreadImpl::EnsureWebKitInitialized() { |
580 if (webkit_platform_support_.get()) | 581 if (webkit_platform_support_.get()) |
581 return; | 582 return; |
582 | 583 |
583 webkit_platform_support_.reset(new RendererWebKitPlatformSupportImpl); | 584 webkit_platform_support_.reset(new RendererWebKitPlatformSupportImpl); |
584 WebKit::initialize(webkit_platform_support_.get()); | 585 WebKit::initialize(webkit_platform_support_.get()); |
585 WebKit::setSharedWorkerRepository( | 586 WebKit::setSharedWorkerRepository( |
586 webkit_platform_support_.get()->sharedWorkerRepository()); | 587 webkit_platform_support_.get()->sharedWorkerRepository()); |
| 588 WebKit::setIDBFactory( |
| 589 webkit_platform_support_.get()->idbFactory()); |
587 | 590 |
588 WebKit::WebCompositorSupport* compositor_support = | 591 WebKit::WebCompositorSupport* compositor_support = |
589 WebKit::Platform::current()->compositorSupport(); | 592 WebKit::Platform::current()->compositorSupport(); |
590 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 593 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
591 | 594 |
592 // TODO(fsamuel): Guests don't currently support threaded compositing. | 595 // TODO(fsamuel): Guests don't currently support threaded compositing. |
593 // This should go away with the new design of the browser plugin. | 596 // This should go away with the new design of the browser plugin. |
594 // The new design can be tracked at: http://crbug.com/134492. | 597 // The new design can be tracked at: http://crbug.com/134492. |
595 bool is_guest = command_line.HasSwitch(switches::kGuestRenderer); | 598 bool is_guest = command_line.HasSwitch(switches::kGuestRenderer); |
596 bool threaded = command_line.HasSwitch(switches::kEnableThreadedCompositing); | 599 bool threaded = command_line.HasSwitch(switches::kEnableThreadedCompositing); |
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1157 RenderThreadImpl::GetFileThreadMessageLoopProxy() { | 1160 RenderThreadImpl::GetFileThreadMessageLoopProxy() { |
1158 DCHECK(message_loop() == MessageLoop::current()); | 1161 DCHECK(message_loop() == MessageLoop::current()); |
1159 if (!file_thread_.get()) { | 1162 if (!file_thread_.get()) { |
1160 file_thread_.reset(new base::Thread("Renderer::FILE")); | 1163 file_thread_.reset(new base::Thread("Renderer::FILE")); |
1161 file_thread_->Start(); | 1164 file_thread_->Start(); |
1162 } | 1165 } |
1163 return file_thread_->message_loop_proxy(); | 1166 return file_thread_->message_loop_proxy(); |
1164 } | 1167 } |
1165 | 1168 |
1166 } // namespace content | 1169 } // namespace content |
OLD | NEW |