Disabling flaky test ChromeRenderProcessHostTestWithCommandLine.ProcessOverflow flaky...
[chromium-blink-merge.git] / content / test / fake_plugin_service.h
blobed8450cba5672be69c39c143a8cd6703c37e8b2b
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"
11 namespace content {
13 class FakePluginService : public PluginService {
14 public:
15 FakePluginService();
16 ~FakePluginService() override;
17 // PluginService implementation:
18 void Init() override;
19 void StartWatchingPlugins() override;
20 bool GetPluginInfoArray(const GURL& url,
21 const std::string& mime_type,
22 bool allow_wildcard,
23 std::vector<WebPluginInfo>* info,
24 std::vector<std::string>* actual_mime_types) override;
25 bool GetPluginInfo(int render_process_id,
26 int render_frame_id,
27 ResourceContext* context,
28 const GURL& url,
29 const GURL& page_url,
30 const std::string& mime_type,
31 bool allow_wildcard,
32 bool* is_stale,
33 WebPluginInfo* info,
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 EnableNpapiPluginsForTesting() override;
56 void DisablePluginsDiscoveryForTesting() override;
57 #if defined(OS_MACOSX)
58 void AppActivated() override;
59 #elif defined(OS_WIN)
60 bool GetPluginInfoFromWindow(HWND window,
61 base::string16* plugin_name,
62 base::string16* plugin_version) override;
63 #endif
64 bool PpapiDevChannelSupported(BrowserContext* browser_context,
65 const GURL& document_url) override;
67 private:
68 DISALLOW_COPY_AND_ASSIGN(FakePluginService);
71 } // namespace content
73 #endif // CONTENT_TEST_FAKE_PLUGIN_SERVICE_H_