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 #ifndef CONTENT_TEST_FAKE_PLUGIN_SERVICE_H_
6 #define CONTENT_TEST_FAKE_PLUGIN_SERVICE_H_
8 #include "base/macros.h"
9 #include "content/public/browser/plugin_service.h"
13 class FakePluginService
: public PluginService
{
16 ~FakePluginService() override
;
17 // PluginService implementation:
19 void StartWatchingPlugins() override
;
20 bool GetPluginInfoArray(const GURL
& url
,
21 const std::string
& mime_type
,
23 std::vector
<WebPluginInfo
>* info
,
24 std::vector
<std::string
>* actual_mime_types
) override
;
25 bool GetPluginInfo(int render_process_id
,
27 ResourceContext
* context
,
30 const std::string
& mime_type
,
34 std::string
* actual_mime_type
) override
;
35 bool GetPluginInfoByPath(const base::FilePath
& plugin_path
,
36 WebPluginInfo
* info
) override
;
37 base::string16
GetPluginDisplayNameByPath(
38 const base::FilePath
& path
) override
;
39 void GetPlugins(const GetPluginsCallback
& callback
) override
;
40 PepperPluginInfo
* GetRegisteredPpapiPluginInfo(
41 const base::FilePath
& plugin_path
) override
;
42 void SetFilter(PluginServiceFilter
* filter
) override
;
43 PluginServiceFilter
* GetFilter() override
;
44 void ForcePluginShutdown(const base::FilePath
& plugin_path
) override
;
45 bool IsPluginUnstable(const base::FilePath
& plugin_path
) override
;
46 void RefreshPlugins() override
;
47 void AddExtraPluginPath(const base::FilePath
& path
) override
;
48 void RemoveExtraPluginPath(const base::FilePath
& path
) override
;
49 void AddExtraPluginDir(const base::FilePath
& path
) override
;
50 void RegisterInternalPlugin(const WebPluginInfo
& info
,
51 bool add_at_beginning
) override
;
52 void UnregisterInternalPlugin(const base::FilePath
& path
) override
;
53 void GetInternalPlugins(std::vector
<WebPluginInfo
>* plugins
) override
;
54 bool NPAPIPluginsSupported() override
;
55 void DisablePluginsDiscoveryForTesting() override
;
56 #if defined(OS_MACOSX)
57 void AppActivated() override
;
59 bool GetPluginInfoFromWindow(HWND window
,
60 base::string16
* plugin_name
,
61 base::string16
* plugin_version
) override
;
63 bool PpapiDevChannelSupported(BrowserContext
* browser_context
,
64 const GURL
& document_url
) override
;
67 DISALLOW_COPY_AND_ASSIGN(FakePluginService
);
70 } // namespace content
72 #endif // CONTENT_TEST_FAKE_PLUGIN_SERVICE_H_