OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 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. |
| 4 |
| 5 // Stub implementation of PluginService for builds with |
| 6 // plugins disabled. |
| 7 |
| 8 #ifndef CONTENT_BROWSER_PLUGIN_SERVICE_STUB_H_ |
| 9 #define CONTENT_BROWSER_PLUGIN_SERVICE_STUB_H_ |
| 10 |
| 11 #include "content/public/browser/plugin_service.h" |
| 12 |
| 13 #include "base/memory/singleton.h" |
| 14 |
| 15 namespace content { |
| 16 class CONTENT_EXPORT PluginServiceStub |
| 17 : NON_EXPORTED_BASE(public PluginService) { |
| 18 public: |
| 19 // Returns the PluginServiceStub singleton. |
| 20 static PluginServiceStub* GetInstance(); |
| 21 |
| 22 // PluginService implementation: |
| 23 virtual void Init() OVERRIDE {} |
| 24 virtual void StartWatchingPlugins() OVERRIDE {} |
| 25 virtual bool GetPluginInfoArray( |
| 26 const GURL& url, |
| 27 const std::string& mime_type, |
| 28 bool allow_wildcard, |
| 29 std::vector<webkit::WebPluginInfo>* info, |
| 30 std::vector<std::string>* actual_mime_types) OVERRIDE; |
| 31 virtual bool GetPluginInfo(int render_process_id, |
| 32 int render_view_id, |
| 33 ResourceContext* context, |
| 34 const GURL& url, |
| 35 const GURL& page_url, |
| 36 const std::string& mime_type, |
| 37 bool allow_wildcard, |
| 38 bool* is_stale, |
| 39 webkit::WebPluginInfo* info, |
| 40 std::string* actual_mime_type) OVERRIDE; |
| 41 virtual bool GetPluginInfoByPath(const FilePath& plugin_path, |
| 42 webkit::WebPluginInfo* info) OVERRIDE; |
| 43 virtual string16 GetPluginDisplayNameByPath(const FilePath& path) OVERRIDE; |
| 44 virtual void GetPlugins(const GetPluginsCallback& callback) OVERRIDE {} |
| 45 virtual PepperPluginInfo* GetRegisteredPpapiPluginInfo( |
| 46 const FilePath& plugin_path) OVERRIDE; |
| 47 virtual void SetFilter(PluginServiceFilter* filter) OVERRIDE {} |
| 48 virtual PluginServiceFilter* GetFilter() OVERRIDE; |
| 49 virtual void ForcePluginShutdown(const FilePath& plugin_path) OVERRIDE {} |
| 50 virtual bool IsPluginUnstable(const FilePath& plugin_path) OVERRIDE; |
| 51 virtual void RefreshPlugins() OVERRIDE {} |
| 52 virtual void AddExtraPluginPath(const FilePath& path) OVERRIDE {} |
| 53 virtual void AddExtraPluginDir(const FilePath& path) OVERRIDE {} |
| 54 virtual void RemoveExtraPluginPath(const FilePath& path) OVERRIDE {} |
| 55 virtual void UnregisterInternalPlugin(const FilePath& path) OVERRIDE {} |
| 56 virtual void RegisterInternalPlugin( |
| 57 const webkit::WebPluginInfo& info, bool add_at_beginning) OVERRIDE {} |
| 58 virtual void GetInternalPlugins( |
| 59 std::vector<webkit::WebPluginInfo>* plugins) OVERRIDE {} |
| 60 virtual webkit::npapi::PluginList* GetPluginList() OVERRIDE; |
| 61 virtual void SetPluginListForTesting( |
| 62 webkit::npapi::PluginList* plugin_list) OVERRIDE {} |
| 63 #if defined(OS_MACOSX) |
| 64 virtual void AppActivated() OVERRIDE {} |
| 65 #endif |
| 66 |
| 67 private: |
| 68 friend struct DefaultSingletonTraits<PluginServiceStub>; |
| 69 |
| 70 PluginServiceStub(); |
| 71 virtual ~PluginServiceStub(); |
| 72 |
| 73 DISALLOW_COPY_AND_ASSIGN(PluginServiceStub); |
| 74 }; |
| 75 |
| 76 } // namespace content |
| 77 |
| 78 #endif // CONTENT_BROWSER_PLUGIN_SERVICE_STUB_H_ |
OLD | NEW |