OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 WEBKIT_PLUGINS_NPAPI_MOCK_PLUGIN_LIST_H_ | 5 #ifndef WEBKIT_PLUGINS_NPAPI_MOCK_PLUGIN_LIST_H_ |
6 #define WEBKIT_PLUGINS_NPAPI_MOCK_PLUGIN_LIST_H_ | 6 #define WEBKIT_PLUGINS_NPAPI_MOCK_PLUGIN_LIST_H_ |
7 | 7 |
8 #include "webkit/plugins/npapi/plugin_list.h" | 8 #include "webkit/plugins/npapi/plugin_list.h" |
9 | 9 |
10 namespace webkit { | 10 namespace webkit { |
11 namespace npapi { | 11 namespace npapi { |
12 | 12 |
13 // A PluginList for tests that avoids file system IO. There is also no reason | 13 // A PluginList for tests that avoids file system IO. There is also no reason |
14 // to use |lock_| (but it doesn't hurt either). | 14 // to use |lock_| (but it doesn't hurt either). |
15 class MockPluginList : public PluginList { | 15 class MockPluginList : public PluginList { |
16 public: | 16 public: |
17 MockPluginList(const PluginGroupDefinition* group_definitions, | 17 MockPluginList(const PluginGroupDefinition* group_definitions, |
18 size_t num_group_definitions); | 18 size_t num_group_definitions); |
19 virtual ~MockPluginList(); | 19 virtual ~MockPluginList(); |
20 | 20 |
21 void AddPluginToLoad(const WebPluginInfo& plugin); | 21 void AddPluginToLoad(const WebPluginInfo& plugin); |
22 void ClearPluginsToLoad(); | 22 void ClearPluginsToLoad(); |
23 | 23 |
| 24 // PluginList: |
| 25 virtual bool GetPluginsIfNoRefreshNeeded( |
| 26 std::vector<webkit::WebPluginInfo>* plugins) OVERRIDE; |
| 27 |
24 private: | 28 private: |
25 std::vector<WebPluginInfo> plugins_to_load_; | 29 std::vector<WebPluginInfo> plugins_to_load_; |
26 | 30 |
27 // PluginList methods: | 31 // PluginList methods: |
28 virtual void LoadPluginsInternal( | 32 virtual void LoadPluginsInternal( |
29 ScopedVector<PluginGroup>* plugin_groups) OVERRIDE; | 33 ScopedVector<PluginGroup>* plugin_groups) OVERRIDE; |
30 }; | 34 }; |
31 | 35 |
32 } // npapi | 36 } // npapi |
33 } // webkit | 37 } // webkit |
34 | 38 |
35 #endif // WEBKIT_PLUGINS_NPAPI_MOCK_PLUGIN_LIST_H_ | 39 #endif // WEBKIT_PLUGINS_NPAPI_MOCK_PLUGIN_LIST_H_ |
OLD | NEW |