| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositor.h" | 70 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositor.h" |
| 71 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDatabase.h" | 71 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDatabase.h" |
| 72 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" | 72 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" |
| 73 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" | 73 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
| 74 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" | 74 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" |
| 75 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNetworkStateNotifi
er.h" | 75 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNetworkStateNotifi
er.h" |
| 76 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenu.h" | 76 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenu.h" |
| 77 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRuntimeFeatures.h" | 77 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRuntimeFeatures.h" |
| 78 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptController.h
" | 78 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptController.h
" |
| 79 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h" | 79 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h" |
| 80 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
| 80 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" | 81 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" |
| 81 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 82 #include "ui/base/layout.h" |
| 82 #include "ui/base/ui_base_switches.h" | 83 #include "ui/base/ui_base_switches.h" |
| 83 #include "v8/include/v8.h" | 84 #include "v8/include/v8.h" |
| 84 #include "webkit/glue/webkit_glue.h" | 85 #include "webkit/glue/webkit_glue.h" |
| 85 | 86 |
| 86 // TODO(port) | 87 // TODO(port) |
| 87 #if !defined(OS_WIN) | 88 #if !defined(OS_WIN) |
| 88 #include "base/memory/scoped_handle.h" | 89 #include "base/memory/scoped_handle.h" |
| 89 #include "content/common/np_channel_base.h" | 90 #include "content/common/np_channel_base.h" |
| 90 #endif | 91 #endif |
| 91 | 92 |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 RenderThreadImpl::RegisterSchemes(); | 481 RenderThreadImpl::RegisterSchemes(); |
| 481 | 482 |
| 482 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 483 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 483 | 484 |
| 484 webkit_glue::EnableWebCoreLogChannels( | 485 webkit_glue::EnableWebCoreLogChannels( |
| 485 command_line.GetSwitchValueASCII(switches::kWebCoreLogChannels)); | 486 command_line.GetSwitchValueASCII(switches::kWebCoreLogChannels)); |
| 486 | 487 |
| 487 if (CommandLine::ForCurrentProcess()->HasSwitch( | 488 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 488 switches::kDomAutomationController)) { | 489 switches::kDomAutomationController)) { |
| 489 base::StringPiece extension = content::GetContentClient()->GetDataResource( | 490 base::StringPiece extension = content::GetContentClient()->GetDataResource( |
| 490 IDR_DOM_AUTOMATION_JS); | 491 IDR_DOM_AUTOMATION_JS, ui::kScaleFactorNone); |
| 491 RegisterExtension(new v8::Extension( | 492 RegisterExtension(new v8::Extension( |
| 492 "dom_automation.js", extension.data(), 0, NULL, extension.size())); | 493 "dom_automation.js", extension.data(), 0, NULL, extension.size())); |
| 493 } | 494 } |
| 494 | 495 |
| 495 web_database_observer_impl_.reset( | 496 web_database_observer_impl_.reset( |
| 496 new WebDatabaseObserverImpl(sync_message_filter())); | 497 new WebDatabaseObserverImpl(sync_message_filter())); |
| 497 WebKit::WebDatabase::setObserver(web_database_observer_impl_.get()); | 498 WebKit::WebDatabase::setObserver(web_database_observer_impl_.get()); |
| 498 | 499 |
| 499 WebRuntimeFeatures::enableSockets( | 500 WebRuntimeFeatures::enableSockets( |
| 500 !command_line.HasSwitch(switches::kDisableWebSockets)); | 501 !command_line.HasSwitch(switches::kDisableWebSockets)); |
| (...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 966 | 967 |
| 967 scoped_refptr<base::MessageLoopProxy> | 968 scoped_refptr<base::MessageLoopProxy> |
| 968 RenderThreadImpl::GetFileThreadMessageLoopProxy() { | 969 RenderThreadImpl::GetFileThreadMessageLoopProxy() { |
| 969 DCHECK(message_loop() == MessageLoop::current()); | 970 DCHECK(message_loop() == MessageLoop::current()); |
| 970 if (!file_thread_.get()) { | 971 if (!file_thread_.get()) { |
| 971 file_thread_.reset(new base::Thread("Renderer::FILE")); | 972 file_thread_.reset(new base::Thread("Renderer::FILE")); |
| 972 file_thread_->Start(); | 973 file_thread_->Start(); |
| 973 } | 974 } |
| 974 return file_thread_->message_loop_proxy(); | 975 return file_thread_->message_loop_proxy(); |
| 975 } | 976 } |
| OLD | NEW |