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/common/pepper_plugin_registry.h" | 5 #include "chrome/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/path_service.h" | 10 #include "base/path_service.h" |
11 #include "base/string_split.h" | 11 #include "base/string_split.h" |
12 #include "base/string_util.h" | 12 #include "base/string_util.h" |
13 #include "base/utf_string_conversions.h" | 13 #include "base/utf_string_conversions.h" |
14 #include "chrome/common/chrome_paths.h" | 14 #include "chrome/common/chrome_paths.h" |
15 #include "chrome/common/chrome_switches.h" | 15 #include "chrome/common/chrome_switches.h" |
| 16 #include "content/common/child_process.h" |
16 #include "content/common/content_switches.h" | 17 #include "content/common/content_switches.h" |
17 #include "remoting/client/plugin/pepper_entrypoints.h" | 18 #include "remoting/client/plugin/pepper_entrypoints.h" |
18 | 19 |
19 namespace { | 20 namespace { |
20 | 21 |
21 const char* kPDFPluginName = "Chrome PDF Viewer"; | 22 const char* kPDFPluginName = "Chrome PDF Viewer"; |
22 const char* kPDFPluginMimeType = "application/pdf"; | 23 const char* kPDFPluginMimeType = "application/pdf"; |
23 const char* kPDFPluginExtension = "pdf"; | 24 const char* kPDFPluginExtension = "pdf"; |
24 const char* kPDFPluginDescription = "Portable Document Format"; | 25 const char* kPDFPluginDescription = "Portable Document Format"; |
25 | 26 |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 } else { | 320 } else { |
320 // Preload all external plugins we're not running out of process. | 321 // Preload all external plugins we're not running out of process. |
321 if (!module->InitAsLibrary(current.path)) { | 322 if (!module->InitAsLibrary(current.path)) { |
322 DLOG(ERROR) << "Failed to load pepper module: " << current.path.value(); | 323 DLOG(ERROR) << "Failed to load pepper module: " << current.path.value(); |
323 continue; | 324 continue; |
324 } | 325 } |
325 } | 326 } |
326 preloaded_modules_[current.path] = module; | 327 preloaded_modules_[current.path] = module; |
327 } | 328 } |
328 } | 329 } |
| 330 |
| 331 MessageLoop* PepperPluginRegistry::GetIPCMessageLoop() { |
| 332 // This is called only in the renderer so we know we have a child process. |
| 333 DCHECK(ChildProcess::current()) << "Must be in the renderer."; |
| 334 return ChildProcess::current()->io_message_loop(); |
| 335 } |
| 336 |
| 337 base::WaitableEvent* PepperPluginRegistry::GetShutdownEvent() { |
| 338 DCHECK(ChildProcess::current()) << "Must be in the renderer."; |
| 339 return ChildProcess::current()->GetShutDownEvent(); |
| 340 } |
| 341 |
| 342 std::set<PP_Instance>* PepperPluginRegistry::GetGloballySeenInstanceIDSet() { |
| 343 // This function is not needed on the host side of the proxy. |
| 344 return NULL; |
| 345 } |
OLD | NEW |