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

Side by Side Diff: content/common/pepper_plugin_registry.cc

Issue 7885009: Removed the dependency of PepperPluginRegistry on Pepper proxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 months 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/common/pepper_plugin_registry.h ('k') | content/renderer/pepper_plugin_delegate_impl.h » ('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) 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 "content/common/pepper_plugin_registry.h" 5 #include "content/common/pepper_plugin_registry.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/native_library.h" 9 #include "base/native_library.h"
10 #include "base/string_split.h" 10 #include "base/string_split.h"
11 #include "base/string_util.h" 11 #include "base/string_util.h"
12 #include "base/utf_string_conversions.h" 12 #include "base/utf_string_conversions.h"
13 #include "content/common/child_process.h"
14 #include "content/common/content_client.h" 13 #include "content/common/content_client.h"
15 #include "content/common/content_switches.h" 14 #include "content/common/content_switches.h"
16 #include "webkit/plugins/npapi/plugin_list.h" 15 #include "webkit/plugins/npapi/plugin_list.h"
17 16
18 namespace { 17 namespace {
19 18
20 // Appends any plugins from the command line to the given vector. 19 // Appends any plugins from the command line to the given vector.
21 void ComputePluginsFromCommandLine(std::vector<PepperPluginInfo>* plugins) { 20 void ComputePluginsFromCommandLine(std::vector<PepperPluginInfo>* plugins) {
22 bool out_of_process = 21 bool out_of_process =
23 CommandLine::ForCurrentProcess()->HasSwitch(switches::kPpapiOutOfProcess); 22 CommandLine::ForCurrentProcess()->HasSwitch(switches::kPpapiOutOfProcess);
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 // Preload all external plugins we're not running out of process. 231 // Preload all external plugins we're not running out of process.
233 if (!module->InitAsLibrary(current.path)) { 232 if (!module->InitAsLibrary(current.path)) {
234 DLOG(ERROR) << "Failed to load pepper module: " << current.path.value(); 233 DLOG(ERROR) << "Failed to load pepper module: " << current.path.value();
235 continue; 234 continue;
236 } 235 }
237 } 236 }
238 preloaded_modules_[current.path] = module; 237 preloaded_modules_[current.path] = module;
239 } 238 }
240 } 239 }
241 240
242 base::MessageLoopProxy* PepperPluginRegistry::GetIPCMessageLoop() {
243 // This is called only in the renderer so we know we have a child process.
244 DCHECK(ChildProcess::current()) << "Must be in the renderer.";
245 return ChildProcess::current()->io_message_loop_proxy();
246 }
247
248 base::WaitableEvent* PepperPluginRegistry::GetShutdownEvent() {
249 DCHECK(ChildProcess::current()) << "Must be in the renderer.";
250 return ChildProcess::current()->GetShutDownEvent();
251 }
OLDNEW
« no previous file with comments | « content/common/pepper_plugin_registry.h ('k') | content/renderer/pepper_plugin_delegate_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698