Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1333)

Side by Side Diff: content/renderer/render_thread_impl.cc

Issue 40303002: Simplify SharedWorkerRepository code (Chromium side) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed comments Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 #include "third_party/WebKit/public/web/WebDatabase.h" 97 #include "third_party/WebKit/public/web/WebDatabase.h"
98 #include "third_party/WebKit/public/web/WebDocument.h" 98 #include "third_party/WebKit/public/web/WebDocument.h"
99 #include "third_party/WebKit/public/web/WebFrame.h" 99 #include "third_party/WebKit/public/web/WebFrame.h"
100 #include "third_party/WebKit/public/web/WebImageCache.h" 100 #include "third_party/WebKit/public/web/WebImageCache.h"
101 #include "third_party/WebKit/public/web/WebKit.h" 101 #include "third_party/WebKit/public/web/WebKit.h"
102 #include "third_party/WebKit/public/web/WebNetworkStateNotifier.h" 102 #include "third_party/WebKit/public/web/WebNetworkStateNotifier.h"
103 #include "third_party/WebKit/public/web/WebPopupMenu.h" 103 #include "third_party/WebKit/public/web/WebPopupMenu.h"
104 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" 104 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h"
105 #include "third_party/WebKit/public/web/WebScriptController.h" 105 #include "third_party/WebKit/public/web/WebScriptController.h"
106 #include "third_party/WebKit/public/web/WebSecurityPolicy.h" 106 #include "third_party/WebKit/public/web/WebSecurityPolicy.h"
107 #include "third_party/WebKit/public/web/WebSharedWorkerRepository.h"
108 #include "third_party/WebKit/public/web/WebView.h" 107 #include "third_party/WebKit/public/web/WebView.h"
109 #include "ui/base/layout.h" 108 #include "ui/base/layout.h"
110 #include "ui/base/ui_base_switches.h" 109 #include "ui/base/ui_base_switches.h"
111 #include "v8/include/v8.h" 110 #include "v8/include/v8.h"
112 #include "webkit/child/worker_task_runner.h" 111 #include "webkit/child/worker_task_runner.h"
113 #include "webkit/glue/webkit_glue.h" 112 #include "webkit/glue/webkit_glue.h"
114 #include "webkit/renderer/compositor_bindings/web_external_bitmap_impl.h" 113 #include "webkit/renderer/compositor_bindings/web_external_bitmap_impl.h"
115 114
116 #if defined(OS_WIN) 115 #if defined(OS_WIN)
117 #include <windows.h> 116 #include <windows.h>
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 630
632 ScheduleIdleHandler(kLongIdleHandlerDelayMs); 631 ScheduleIdleHandler(kLongIdleHandlerDelayMs);
633 } 632 }
634 633
635 void RenderThreadImpl::EnsureWebKitInitialized() { 634 void RenderThreadImpl::EnsureWebKitInitialized() {
636 if (webkit_platform_support_) 635 if (webkit_platform_support_)
637 return; 636 return;
638 637
639 webkit_platform_support_.reset(new RendererWebKitPlatformSupportImpl); 638 webkit_platform_support_.reset(new RendererWebKitPlatformSupportImpl);
640 WebKit::initialize(webkit_platform_support_.get()); 639 WebKit::initialize(webkit_platform_support_.get());
641 WebKit::setSharedWorkerRepository(
642 webkit_platform_support_.get()->sharedWorkerRepository());
643 640
644 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 641 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
645 642
646 bool enable = command_line.HasSwitch(switches::kEnableThreadedCompositing); 643 bool enable = command_line.HasSwitch(switches::kEnableThreadedCompositing);
647 if (enable) { 644 if (enable) {
648 #if defined(OS_ANDROID) 645 #if defined(OS_ANDROID)
649 if (SynchronousCompositorFactory* factory = 646 if (SynchronousCompositorFactory* factory =
650 SynchronousCompositorFactory::GetInstance()) 647 SynchronousCompositorFactory::GetInstance())
651 compositor_message_loop_proxy_ = 648 compositor_message_loop_proxy_ =
652 factory->GetCompositorMessageLoop(); 649 factory->GetCompositorMessageLoop();
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after
1344 if (!gamepad_shared_memory_reader_) 1341 if (!gamepad_shared_memory_reader_)
1345 gamepad_shared_memory_reader_.reset(new GamepadSharedMemoryReader); 1342 gamepad_shared_memory_reader_.reset(new GamepadSharedMemoryReader);
1346 gamepad_shared_memory_reader_->SampleGamepads(*data); 1343 gamepad_shared_memory_reader_->SampleGamepads(*data);
1347 } 1344 }
1348 1345
1349 base::ProcessId RenderThreadImpl::renderer_process_id() const { 1346 base::ProcessId RenderThreadImpl::renderer_process_id() const {
1350 return renderer_process_id_; 1347 return renderer_process_id_;
1351 } 1348 }
1352 1349
1353 } // namespace content 1350 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698