Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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/test/fake_plugin_service.h" | 5 #include "content/test/fake_plugin_service.h" |
| 6 | 6 |
| 7 #include "content/public/common/webplugininfo.h" | |
| 8 | |
| 7 namespace content { | 9 namespace content { |
| 8 | 10 |
| 9 FakePluginService::FakePluginService() { | 11 FakePluginService::FakePluginService() { |
| 10 } | 12 } |
| 11 | 13 |
| 14 FakePluginService::FakePluginService(bool is_plugin_available) | |
| 15 : is_plugin_available_(is_plugin_available) { | |
| 16 } | |
| 17 | |
| 12 FakePluginService::~FakePluginService() { | 18 FakePluginService::~FakePluginService() { |
| 13 } | 19 } |
| 14 | 20 |
| 15 void FakePluginService::Init() { | 21 void FakePluginService::Init() { |
| 16 } | 22 } |
| 17 | 23 |
| 18 void FakePluginService::StartWatchingPlugins() { | 24 void FakePluginService::StartWatchingPlugins() { |
| 19 } | 25 } |
| 20 | 26 |
| 21 bool FakePluginService::GetPluginInfoArray( | 27 bool FakePluginService::GetPluginInfoArray( |
| 22 const GURL& url, | 28 const GURL& url, |
| 23 const std::string& mime_type, | 29 const std::string& mime_type, |
| 24 bool allow_wildcard, | 30 bool allow_wildcard, |
| 25 std::vector<WebPluginInfo>* plugins, | 31 std::vector<WebPluginInfo>* plugins, |
| 26 std::vector<std::string>* actual_mime_types) { | 32 std::vector<std::string>* actual_mime_types) { |
| 27 return false; | 33 return false; |
| 28 } | 34 } |
| 29 | 35 |
| 30 bool FakePluginService::GetPluginInfo(int render_process_id, | 36 bool FakePluginService::GetPluginInfo(int render_process_id, |
| 31 int render_frame_id, | 37 int render_frame_id, |
| 32 ResourceContext* context, | 38 ResourceContext* context, |
| 33 const GURL& url, | 39 const GURL& url, |
| 34 const GURL& page_url, | 40 const GURL& page_url, |
| 35 const std::string& mime_type, | 41 const std::string& mime_type, |
| 36 bool allow_wildcard, | 42 bool allow_wildcard, |
| 37 bool* is_stale, | 43 bool* is_stale, |
| 38 WebPluginInfo* info, | 44 WebPluginInfo* info, |
| 39 std::string* actual_mime_type) { | 45 std::string* actual_mime_type) { |
| 40 *is_stale = false; | 46 *is_stale = false; |
| 41 return false; | 47 if (!is_plugin_available_) |
| 48 return false; | |
| 49 info->type = WebPluginInfo::PLUGIN_TYPE_BROWSER_PLUGIN; | |
| 50 info->path = base::FilePath(); | |
|
raymes
2015/03/19 00:45:51
If a plugin is available, shouldn't we return a va
Deepak
2015/03/19 10:22:23
Even when we give the proper plugin path then also
| |
| 51 return true; | |
|
raymes
2015/03/19 00:45:51
Rather than adding this stuff here, I think we sho
Deepak
2015/03/19 10:22:23
Done.
| |
| 42 } | 52 } |
| 43 | 53 |
| 44 bool FakePluginService::GetPluginInfoByPath(const base::FilePath& plugin_path, | 54 bool FakePluginService::GetPluginInfoByPath(const base::FilePath& plugin_path, |
| 45 WebPluginInfo* info) { | 55 WebPluginInfo* info) { |
| 46 return false; | 56 return false; |
| 47 } | 57 } |
| 48 | 58 |
| 49 base::string16 FakePluginService::GetPluginDisplayNameByPath( | 59 base::string16 FakePluginService::GetPluginDisplayNameByPath( |
| 50 const base::FilePath& path) { | 60 const base::FilePath& path) { |
| 51 return base::string16(); | 61 return base::string16(); |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 119 } | 129 } |
| 120 #endif | 130 #endif |
| 121 | 131 |
| 122 bool FakePluginService::PpapiDevChannelSupported( | 132 bool FakePluginService::PpapiDevChannelSupported( |
| 123 BrowserContext* browser_context, | 133 BrowserContext* browser_context, |
| 124 const GURL& document_url) { | 134 const GURL& document_url) { |
| 125 return false; | 135 return false; |
| 126 } | 136 } |
| 127 | 137 |
| 128 } // namespace content | 138 } // namespace content |
| OLD | NEW |