| 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 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 485 RenderThreadImpl::RegisterSchemes(); | 486 RenderThreadImpl::RegisterSchemes(); |
| 486 | 487 |
| 487 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 488 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 488 | 489 |
| 489 webkit_glue::EnableWebCoreLogChannels( | 490 webkit_glue::EnableWebCoreLogChannels( |
| 490 command_line.GetSwitchValueASCII(switches::kWebCoreLogChannels)); | 491 command_line.GetSwitchValueASCII(switches::kWebCoreLogChannels)); |
| 491 | 492 |
| 492 if (CommandLine::ForCurrentProcess()->HasSwitch( | 493 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 493 switches::kDomAutomationController)) { | 494 switches::kDomAutomationController)) { |
| 494 base::StringPiece extension = content::GetContentClient()->GetDataResource( | 495 base::StringPiece extension = content::GetContentClient()->GetDataResource( |
| 495 IDR_DOM_AUTOMATION_JS); | 496 IDR_DOM_AUTOMATION_JS, ui::SCALE_FACTOR_NONE); |
| 496 RegisterExtension(new v8::Extension( | 497 RegisterExtension(new v8::Extension( |
| 497 "dom_automation.js", extension.data(), 0, NULL, extension.size())); | 498 "dom_automation.js", extension.data(), 0, NULL, extension.size())); |
| 498 } | 499 } |
| 499 | 500 |
| 500 web_database_observer_impl_.reset( | 501 web_database_observer_impl_.reset( |
| 501 new WebDatabaseObserverImpl(sync_message_filter())); | 502 new WebDatabaseObserverImpl(sync_message_filter())); |
| 502 WebKit::WebDatabase::setObserver(web_database_observer_impl_.get()); | 503 WebKit::WebDatabase::setObserver(web_database_observer_impl_.get()); |
| 503 | 504 |
| 504 WebRuntimeFeatures::enableSockets( | 505 WebRuntimeFeatures::enableSockets( |
| 505 !command_line.HasSwitch(switches::kDisableWebSockets)); | 506 !command_line.HasSwitch(switches::kDisableWebSockets)); |
| (...skipping 460 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 |