Upstream the iOS web_shell and supporting code
[chromium-blink-merge.git] / content / test / fake_plugin_service.cc
blobae7d7a6d05cbd6bcc51e97e97b6f19facbe7f80e
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "content/test/fake_plugin_service.h"
7 namespace content {
9 FakePluginService::FakePluginService() {
12 FakePluginService::~FakePluginService() {
15 void FakePluginService::Init() {
18 void FakePluginService::StartWatchingPlugins() {
21 bool FakePluginService::GetPluginInfoArray(
22 const GURL& url,
23 const std::string& mime_type,
24 bool allow_wildcard,
25 std::vector<WebPluginInfo>* plugins,
26 std::vector<std::string>* actual_mime_types) {
27 return false;
30 bool FakePluginService::GetPluginInfo(int render_process_id,
31 int render_frame_id,
32 ResourceContext* context,
33 const GURL& url,
34 const GURL& page_url,
35 const std::string& mime_type,
36 bool allow_wildcard,
37 bool* is_stale,
38 WebPluginInfo* info,
39 std::string* actual_mime_type) {
40 *is_stale = false;
41 return false;
44 bool FakePluginService::GetPluginInfoByPath(const base::FilePath& plugin_path,
45 WebPluginInfo* info) {
46 return false;
49 base::string16 FakePluginService::GetPluginDisplayNameByPath(
50 const base::FilePath& path) {
51 return base::string16();
54 void FakePluginService::GetPlugins(const GetPluginsCallback& callback) {
57 PepperPluginInfo* FakePluginService::GetRegisteredPpapiPluginInfo(
58 const base::FilePath& plugin_path) {
59 return nullptr;
62 void FakePluginService::SetFilter(PluginServiceFilter* filter) {
65 PluginServiceFilter* FakePluginService::GetFilter() {
66 return nullptr;
69 void FakePluginService::ForcePluginShutdown(const base::FilePath& plugin_path) {
72 bool FakePluginService::IsPluginUnstable(const base::FilePath& path) {
73 return false;
76 void FakePluginService::RefreshPlugins() {
79 void FakePluginService::AddExtraPluginPath(const base::FilePath& path) {
82 void FakePluginService::RemoveExtraPluginPath(const base::FilePath& path) {
85 void FakePluginService::AddExtraPluginDir(const base::FilePath& path) {
88 void FakePluginService::RegisterInternalPlugin(
89 const WebPluginInfo& info,
90 bool add_at_beginning) {
93 void FakePluginService::UnregisterInternalPlugin(const base::FilePath& path) {
96 void FakePluginService::GetInternalPlugins(
97 std::vector<WebPluginInfo>* plugins) {
100 bool FakePluginService::NPAPIPluginsSupported() {
101 return false;
104 void FakePluginService::EnableNpapiPlugins() {
107 void FakePluginService::DisablePluginsDiscoveryForTesting() {
110 #if defined(OS_MACOSX)
111 void FakePluginService::AppActivated() {
113 #elif defined(OS_WIN)
114 bool FakePluginService::GetPluginInfoFromWindow(
115 HWND window,
116 base::string16* plugin_name,
117 base::string16* plugin_version) {
118 return false;
120 #endif
122 bool FakePluginService::PpapiDevChannelSupported(
123 BrowserContext* browser_context,
124 const GURL& document_url) {
125 return false;
128 } // namespace content