| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/renderer/chrome_content_renderer_client.h" | 5 #include "chrome/renderer/chrome_content_renderer_client.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginParams.h" | 73 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginParams.h" |
| 74 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" | 74 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" |
| 75 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h" | 75 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h" |
| 76 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" | 76 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" |
| 77 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLError.h" | 77 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLError.h" |
| 78 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLRequest.h" | 78 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLRequest.h" |
| 79 #include "ui/base/l10n/l10n_util.h" | 79 #include "ui/base/l10n/l10n_util.h" |
| 80 #include "ui/base/resource/resource_bundle.h" | 80 #include "ui/base/resource/resource_bundle.h" |
| 81 #include "webkit/plugins/npapi/plugin_list.h" | 81 #include "webkit/plugins/npapi/plugin_list.h" |
| 82 #include "webkit/plugins/ppapi/plugin_module.h" | 82 #include "webkit/plugins/ppapi/plugin_module.h" |
| 83 #include "webkit/plugins/ppapi/ppapi_interface_factory.h" |
| 83 | 84 |
| 84 using WebKit::WebCache; | 85 using WebKit::WebCache; |
| 85 using WebKit::WebDataSource; | 86 using WebKit::WebDataSource; |
| 86 using WebKit::WebFrame; | 87 using WebKit::WebFrame; |
| 87 using WebKit::WebPlugin; | 88 using WebKit::WebPlugin; |
| 88 using WebKit::WebPluginParams; | 89 using WebKit::WebPluginParams; |
| 89 using WebKit::WebSecurityOrigin; | 90 using WebKit::WebSecurityOrigin; |
| 90 using WebKit::WebSecurityPolicy; | 91 using WebKit::WebSecurityPolicy; |
| 91 using WebKit::WebString; | 92 using WebKit::WebString; |
| 92 using WebKit::WebURL; | 93 using WebKit::WebURL; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 existing_names->swap(names); | 138 existing_names->swap(names); |
| 138 existing_values->swap(values); | 139 existing_values->swap(values); |
| 139 } | 140 } |
| 140 | 141 |
| 141 } // namespace | 142 } // namespace |
| 142 | 143 |
| 143 namespace chrome { | 144 namespace chrome { |
| 144 | 145 |
| 145 ChromeContentRendererClient::ChromeContentRendererClient() | 146 ChromeContentRendererClient::ChromeContentRendererClient() |
| 146 : spellcheck_provider_(NULL) { | 147 : spellcheck_provider_(NULL) { |
| 147 chrome::InitializePPAPI(); | |
| 148 } | 148 } |
| 149 | 149 |
| 150 ChromeContentRendererClient::~ChromeContentRendererClient() { | 150 ChromeContentRendererClient::~ChromeContentRendererClient() { |
| 151 chrome::UninitializePPAPI(); | |
| 152 } | 151 } |
| 153 | 152 |
| 154 void ChromeContentRendererClient::RenderThreadStarted() { | 153 void ChromeContentRendererClient::RenderThreadStarted() { |
| 155 chrome_observer_.reset(new ChromeRenderProcessObserver(this)); | 154 chrome_observer_.reset(new ChromeRenderProcessObserver(this)); |
| 156 extension_dispatcher_.reset(new ExtensionDispatcher()); | 155 extension_dispatcher_.reset(new ExtensionDispatcher()); |
| 157 histogram_snapshots_.reset(new RendererHistogramSnapshots()); | 156 histogram_snapshots_.reset(new RendererHistogramSnapshots()); |
| 158 net_predictor_.reset(new RendererNetPredictor()); | 157 net_predictor_.reset(new RendererNetPredictor()); |
| 159 spellcheck_.reset(new SpellCheck()); | 158 spellcheck_.reset(new SpellCheck()); |
| 160 visited_link_slave_.reset(new VisitedLinkSlave()); | 159 visited_link_slave_.reset(new VisitedLinkSlave()); |
| 161 #if defined(ENABLE_SAFE_BROWSING) | 160 #if defined(ENABLE_SAFE_BROWSING) |
| (...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 866 } | 865 } |
| 867 | 866 |
| 868 bool ChromeContentRendererClient::IsAdblockPlusWithWebRequestInstalled() { | 867 bool ChromeContentRendererClient::IsAdblockPlusWithWebRequestInstalled() { |
| 869 return extension_dispatcher_->IsAdblockPlusWithWebRequestInstalled(); | 868 return extension_dispatcher_->IsAdblockPlusWithWebRequestInstalled(); |
| 870 } | 869 } |
| 871 | 870 |
| 872 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() { | 871 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() { |
| 873 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled(); | 872 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled(); |
| 874 } | 873 } |
| 875 | 874 |
| 875 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories( |
| 876 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) { |
| 877 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory); |
| 878 } |
| 879 |
| 876 } // namespace chrome | 880 } // namespace chrome |
| OLD | NEW |