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

Unified Diff: content/browser/plugin_service_stub.h

Issue 11507017: Add PluginServiceStub for builds with enable_plugins==0 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/loader/buffered_resource_handler.cc ('k') | content/browser/plugin_service_stub.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/plugin_service_stub.h
diff --git a/content/browser/plugin_service_stub.h b/content/browser/plugin_service_stub.h
new file mode 100644
index 0000000000000000000000000000000000000000..95a95c31721aee7db7f884642532ec7545fb367f
--- /dev/null
+++ b/content/browser/plugin_service_stub.h
@@ -0,0 +1,78 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Stub implementation of PluginService for builds with
+// plugins disabled.
+
+#ifndef CONTENT_BROWSER_PLUGIN_SERVICE_STUB_H_
+#define CONTENT_BROWSER_PLUGIN_SERVICE_STUB_H_
+
+#include "content/public/browser/plugin_service.h"
+
+#include "base/memory/singleton.h"
+
+namespace content {
+class CONTENT_EXPORT PluginServiceStub
+ : NON_EXPORTED_BASE(public PluginService) {
+ public:
+ // Returns the PluginServiceStub singleton.
+ static PluginServiceStub* GetInstance();
+
+ // PluginService implementation:
+ virtual void Init() OVERRIDE {}
+ virtual void StartWatchingPlugins() OVERRIDE {}
+ virtual bool GetPluginInfoArray(
+ const GURL& url,
+ const std::string& mime_type,
+ bool allow_wildcard,
+ std::vector<webkit::WebPluginInfo>* info,
+ std::vector<std::string>* actual_mime_types) OVERRIDE;
+ virtual bool GetPluginInfo(int render_process_id,
+ int render_view_id,
+ ResourceContext* context,
+ const GURL& url,
+ const GURL& page_url,
+ const std::string& mime_type,
+ bool allow_wildcard,
+ bool* is_stale,
+ webkit::WebPluginInfo* info,
+ std::string* actual_mime_type) OVERRIDE;
+ virtual bool GetPluginInfoByPath(const FilePath& plugin_path,
+ webkit::WebPluginInfo* info) OVERRIDE;
+ virtual string16 GetPluginDisplayNameByPath(const FilePath& path) OVERRIDE;
+ virtual void GetPlugins(const GetPluginsCallback& callback) OVERRIDE {}
+ virtual PepperPluginInfo* GetRegisteredPpapiPluginInfo(
+ const FilePath& plugin_path) OVERRIDE;
+ virtual void SetFilter(PluginServiceFilter* filter) OVERRIDE {}
+ virtual PluginServiceFilter* GetFilter() OVERRIDE;
+ virtual void ForcePluginShutdown(const FilePath& plugin_path) OVERRIDE {}
+ virtual bool IsPluginUnstable(const FilePath& plugin_path) OVERRIDE;
+ virtual void RefreshPlugins() OVERRIDE {}
+ virtual void AddExtraPluginPath(const FilePath& path) OVERRIDE {}
+ virtual void AddExtraPluginDir(const FilePath& path) OVERRIDE {}
+ virtual void RemoveExtraPluginPath(const FilePath& path) OVERRIDE {}
+ virtual void UnregisterInternalPlugin(const FilePath& path) OVERRIDE {}
+ virtual void RegisterInternalPlugin(
+ const webkit::WebPluginInfo& info, bool add_at_beginning) OVERRIDE {}
+ virtual void GetInternalPlugins(
+ std::vector<webkit::WebPluginInfo>* plugins) OVERRIDE {}
+ virtual webkit::npapi::PluginList* GetPluginList() OVERRIDE;
+ virtual void SetPluginListForTesting(
+ webkit::npapi::PluginList* plugin_list) OVERRIDE {}
+#if defined(OS_MACOSX)
+ virtual void AppActivated() OVERRIDE {}
+#endif
+
+ private:
+ friend struct DefaultSingletonTraits<PluginServiceStub>;
+
+ PluginServiceStub();
+ virtual ~PluginServiceStub();
+
+ DISALLOW_COPY_AND_ASSIGN(PluginServiceStub);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_PLUGIN_SERVICE_STUB_H_
« no previous file with comments | « content/browser/loader/buffered_resource_handler.cc ('k') | content/browser/plugin_service_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698