| 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 #ifndef CONTENT_TEST_FAKE_PLUGIN_SERVICE_H_ | 5 #ifndef CONTENT_TEST_FAKE_PLUGIN_SERVICE_H_ |
| 6 #define CONTENT_TEST_FAKE_PLUGIN_SERVICE_H_ | 6 #define CONTENT_TEST_FAKE_PLUGIN_SERVICE_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "content/public/browser/plugin_service.h" | 10 #include "content/public/browser/plugin_service.h" |
| 11 | 11 |
| 12 namespace content { | 12 namespace content { |
| 13 | 13 |
| 14 class FakePluginService : public PluginService { | 14 class FakePluginService : public PluginService { |
| 15 public: | 15 public: |
| 16 FakePluginService(); | 16 FakePluginService(); |
| 17 ~FakePluginService() override; | 17 ~FakePluginService() override; |
| 18 // PluginService implementation: | 18 // PluginService implementation: |
| 19 void Init() override; | 19 void Init() override; |
| 20 void StartWatchingPlugins() override; | |
| 21 bool GetPluginInfoArray(const GURL& url, | 20 bool GetPluginInfoArray(const GURL& url, |
| 22 const std::string& mime_type, | 21 const std::string& mime_type, |
| 23 bool allow_wildcard, | 22 bool allow_wildcard, |
| 24 std::vector<WebPluginInfo>* info, | 23 std::vector<WebPluginInfo>* info, |
| 25 std::vector<std::string>* actual_mime_types) override; | 24 std::vector<std::string>* actual_mime_types) override; |
| 26 bool GetPluginInfo(int render_process_id, | 25 bool GetPluginInfo(int render_process_id, |
| 27 int render_frame_id, | 26 int render_frame_id, |
| 28 ResourceContext* context, | 27 ResourceContext* context, |
| 29 const GURL& url, | 28 const GURL& url, |
| 30 const GURL& page_url, | 29 const GURL& page_url, |
| 31 const std::string& mime_type, | 30 const std::string& mime_type, |
| 32 bool allow_wildcard, | 31 bool allow_wildcard, |
| 33 bool* is_stale, | 32 bool* is_stale, |
| 34 WebPluginInfo* info, | 33 WebPluginInfo* info, |
| 35 std::string* actual_mime_type) override; | 34 std::string* actual_mime_type) override; |
| 36 bool GetPluginInfoByPath(const base::FilePath& plugin_path, | 35 bool GetPluginInfoByPath(const base::FilePath& plugin_path, |
| 37 WebPluginInfo* info) override; | 36 WebPluginInfo* info) override; |
| 38 base::string16 GetPluginDisplayNameByPath( | 37 base::string16 GetPluginDisplayNameByPath( |
| 39 const base::FilePath& path) override; | 38 const base::FilePath& path) override; |
| 40 void GetPlugins(const GetPluginsCallback& callback) override; | 39 void GetPlugins(const GetPluginsCallback& callback) override; |
| 41 PepperPluginInfo* GetRegisteredPpapiPluginInfo( | 40 PepperPluginInfo* GetRegisteredPpapiPluginInfo( |
| 42 const base::FilePath& plugin_path) override; | 41 const base::FilePath& plugin_path) override; |
| 43 void SetFilter(PluginServiceFilter* filter) override; | 42 void SetFilter(PluginServiceFilter* filter) override; |
| 44 PluginServiceFilter* GetFilter() override; | 43 PluginServiceFilter* GetFilter() override; |
| 45 void ForcePluginShutdown(const base::FilePath& plugin_path) override; | |
| 46 bool IsPluginUnstable(const base::FilePath& plugin_path) override; | 44 bool IsPluginUnstable(const base::FilePath& plugin_path) override; |
| 47 void RefreshPlugins() override; | 45 void RefreshPlugins() override; |
| 48 void AddExtraPluginPath(const base::FilePath& path) override; | |
| 49 void RemoveExtraPluginPath(const base::FilePath& path) override; | |
| 50 void AddExtraPluginDir(const base::FilePath& path) override; | |
| 51 void RegisterInternalPlugin(const WebPluginInfo& info, | 46 void RegisterInternalPlugin(const WebPluginInfo& info, |
| 52 bool add_at_beginning) override; | 47 bool add_at_beginning) override; |
| 53 void UnregisterInternalPlugin(const base::FilePath& path) override; | 48 void UnregisterInternalPlugin(const base::FilePath& path) override; |
| 54 void GetInternalPlugins(std::vector<WebPluginInfo>* plugins) override; | 49 void GetInternalPlugins(std::vector<WebPluginInfo>* plugins) override; |
| 55 bool NPAPIPluginsSupported() override; | |
| 56 void DisablePluginsDiscoveryForTesting() override; | |
| 57 #if defined(OS_MACOSX) | |
| 58 void AppActivated() override; | |
| 59 #endif | |
| 60 bool PpapiDevChannelSupported(BrowserContext* browser_context, | 50 bool PpapiDevChannelSupported(BrowserContext* browser_context, |
| 61 const GURL& document_url) override; | 51 const GURL& document_url) override; |
| 62 | 52 |
| 63 private: | 53 private: |
| 64 DISALLOW_COPY_AND_ASSIGN(FakePluginService); | 54 DISALLOW_COPY_AND_ASSIGN(FakePluginService); |
| 65 }; | 55 }; |
| 66 | 56 |
| 67 } // namespace content | 57 } // namespace content |
| 68 | 58 |
| 69 #endif // CONTENT_TEST_FAKE_PLUGIN_SERVICE_H_ | 59 #endif // CONTENT_TEST_FAKE_PLUGIN_SERVICE_H_ |
| OLD | NEW |