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 "content/browser/plugin_service.h" | 5 #include "content/browser/plugin_service.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 | 465 |
466 PluginProcessHost* plugin_host = FindOrStartNpapiPluginProcess(plugin_path); | 466 PluginProcessHost* plugin_host = FindOrStartNpapiPluginProcess(plugin_path); |
467 if (plugin_host) { | 467 if (plugin_host) { |
468 client->OnFoundPluginProcessHost(plugin_host); | 468 client->OnFoundPluginProcessHost(plugin_host); |
469 plugin_host->OpenChannelToPlugin(client); | 469 plugin_host->OpenChannelToPlugin(client); |
470 } else { | 470 } else { |
471 client->OnError(); | 471 client->OnError(); |
472 } | 472 } |
473 } | 473 } |
474 | 474 |
| 475 bool PluginService::GetPluginInfoArray( |
| 476 const GURL& url, |
| 477 const std::string& mime_type, |
| 478 bool allow_wildcard, |
| 479 std::vector<webkit::WebPluginInfo>* plugins, |
| 480 std::vector<std::string>* actual_mime_types) { |
| 481 bool use_stale = false; |
| 482 webkit::npapi::PluginList::Singleton()->GetPluginInfoArray( |
| 483 url, mime_type, allow_wildcard, &use_stale, plugins, actual_mime_types); |
| 484 return use_stale; |
| 485 } |
| 486 |
475 bool PluginService::GetPluginInfo(int render_process_id, | 487 bool PluginService::GetPluginInfo(int render_process_id, |
476 int render_view_id, | 488 int render_view_id, |
477 const content::ResourceContext& context, | 489 const content::ResourceContext& context, |
478 const GURL& url, | 490 const GURL& url, |
479 const GURL& page_url, | 491 const GURL& page_url, |
480 const std::string& mime_type, | 492 const std::string& mime_type, |
481 bool allow_wildcard, | 493 bool allow_wildcard, |
482 bool* use_stale, | 494 bool* use_stale, |
483 webkit::WebPluginInfo* info, | 495 webkit::WebPluginInfo* info, |
484 std::string* actual_mime_type) { | 496 std::string* actual_mime_type) { |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
635 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 647 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
636 // static | 648 // static |
637 void PluginService::RegisterFilePathWatcher( | 649 void PluginService::RegisterFilePathWatcher( |
638 FilePathWatcher *watcher, | 650 FilePathWatcher *watcher, |
639 const FilePath& path, | 651 const FilePath& path, |
640 FilePathWatcher::Delegate* delegate) { | 652 FilePathWatcher::Delegate* delegate) { |
641 bool result = watcher->Watch(path, delegate); | 653 bool result = watcher->Watch(path, delegate); |
642 DCHECK(result); | 654 DCHECK(result); |
643 } | 655 } |
644 #endif | 656 #endif |
OLD | NEW |