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

Side by Side Diff: content/browser/plugin_service.cc

Issue 7990005: Use a placeholder instead of the default plugin for missing plug-ins on Mac and Linux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit Created 9 years, 2 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/browser/plugin_service.h ('k') | content/common/view_messages.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/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
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
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
OLDNEW
« no previous file with comments | « content/browser/plugin_service.h ('k') | content/common/view_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698