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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositor.h" | 72 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositor.h" |
73 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDatabase.h" | 73 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDatabase.h" |
74 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" | 74 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" |
75 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" | 75 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
76 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" | 76 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" |
77 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNetworkStateNotifi
er.h" | 77 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNetworkStateNotifi
er.h" |
78 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenu.h" | 78 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenu.h" |
79 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRuntimeFeatures.h" | 79 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRuntimeFeatures.h" |
80 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptController.h
" | 80 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptController.h
" |
81 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h" | 81 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h" |
| 82 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
82 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" | 83 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" |
83 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 84 #include "ui/base/layout.h" |
84 #include "ui/base/ui_base_switches.h" | 85 #include "ui/base/ui_base_switches.h" |
85 #include "v8/include/v8.h" | 86 #include "v8/include/v8.h" |
86 #include "webkit/glue/webkit_glue.h" | 87 #include "webkit/glue/webkit_glue.h" |
87 | 88 |
88 // TODO(port) | 89 // TODO(port) |
89 #if !defined(OS_WIN) | 90 #if !defined(OS_WIN) |
90 #include "base/memory/scoped_handle.h" | 91 #include "base/memory/scoped_handle.h" |
91 #include "content/common/np_channel_base.h" | 92 #include "content/common/np_channel_base.h" |
92 #endif | 93 #endif |
93 | 94 |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
492 RenderThreadImpl::RegisterSchemes(); | 493 RenderThreadImpl::RegisterSchemes(); |
493 | 494 |
494 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 495 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
495 | 496 |
496 webkit_glue::EnableWebCoreLogChannels( | 497 webkit_glue::EnableWebCoreLogChannels( |
497 command_line.GetSwitchValueASCII(switches::kWebCoreLogChannels)); | 498 command_line.GetSwitchValueASCII(switches::kWebCoreLogChannels)); |
498 | 499 |
499 if (CommandLine::ForCurrentProcess()->HasSwitch( | 500 if (CommandLine::ForCurrentProcess()->HasSwitch( |
500 switches::kDomAutomationController)) { | 501 switches::kDomAutomationController)) { |
501 base::StringPiece extension = content::GetContentClient()->GetDataResource( | 502 base::StringPiece extension = content::GetContentClient()->GetDataResource( |
502 IDR_DOM_AUTOMATION_JS); | 503 IDR_DOM_AUTOMATION_JS, ui::SCALE_FACTOR_NONE); |
503 RegisterExtension(new v8::Extension( | 504 RegisterExtension(new v8::Extension( |
504 "dom_automation.js", extension.data(), 0, NULL, extension.size())); | 505 "dom_automation.js", extension.data(), 0, NULL, extension.size())); |
505 } | 506 } |
506 | 507 |
507 web_database_observer_impl_.reset( | 508 web_database_observer_impl_.reset( |
508 new WebDatabaseObserverImpl(sync_message_filter())); | 509 new WebDatabaseObserverImpl(sync_message_filter())); |
509 WebKit::WebDatabase::setObserver(web_database_observer_impl_.get()); | 510 WebKit::WebDatabase::setObserver(web_database_observer_impl_.get()); |
510 | 511 |
511 WebRuntimeFeatures::enableSockets( | 512 WebRuntimeFeatures::enableSockets( |
512 !command_line.HasSwitch(switches::kDisableWebSockets)); | 513 !command_line.HasSwitch(switches::kDisableWebSockets)); |
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
984 | 985 |
985 scoped_refptr<base::MessageLoopProxy> | 986 scoped_refptr<base::MessageLoopProxy> |
986 RenderThreadImpl::GetFileThreadMessageLoopProxy() { | 987 RenderThreadImpl::GetFileThreadMessageLoopProxy() { |
987 DCHECK(message_loop() == MessageLoop::current()); | 988 DCHECK(message_loop() == MessageLoop::current()); |
988 if (!file_thread_.get()) { | 989 if (!file_thread_.get()) { |
989 file_thread_.reset(new base::Thread("Renderer::FILE")); | 990 file_thread_.reset(new base::Thread("Renderer::FILE")); |
990 file_thread_->Start(); | 991 file_thread_->Start(); |
991 } | 992 } |
992 return file_thread_->message_loop_proxy(); | 993 return file_thread_->message_loop_proxy(); |
993 } | 994 } |
OLD | NEW |