| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 CONTENT_PUBLIC_BROWSER_PLUGIN_SERVICE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_PLUGIN_SERVICE_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_PLUGIN_SERVICE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_PLUGIN_SERVICE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
| 13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
| 14 #include "content/common/content_export.h" | 14 #include "content/common/content_export.h" |
| 15 | 15 |
| 16 class GURL; | 16 class GURL; |
| 17 | 17 |
| 18 namespace base { | 18 namespace base { |
| 19 class FilePath; | 19 class FilePath; |
| 20 } | 20 } |
| 21 | 21 |
| 22 namespace url { |
| 23 class Origin; |
| 24 } |
| 25 |
| 22 namespace content { | 26 namespace content { |
| 23 | 27 |
| 24 class BrowserContext; | 28 class BrowserContext; |
| 25 class PluginServiceFilter; | 29 class PluginServiceFilter; |
| 26 class ResourceContext; | 30 class ResourceContext; |
| 27 struct PepperPluginInfo; | 31 struct PepperPluginInfo; |
| 28 struct WebPluginInfo; | 32 struct WebPluginInfo; |
| 29 | 33 |
| 30 // This must be created on the main thread but it's only called on the IO/file | 34 // This must be created on the main thread but it's only called on the IO/file |
| 31 // thread. This is an asynchronous wrapper around the PluginList interface for | 35 // thread. This is an asynchronous wrapper around the PluginList interface for |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 std::vector<WebPluginInfo>* info, | 67 std::vector<WebPluginInfo>* info, |
| 64 std::vector<std::string>* actual_mime_types) = 0; | 68 std::vector<std::string>* actual_mime_types) = 0; |
| 65 | 69 |
| 66 // Gets plugin info for an individual plugin and filters the plugins using | 70 // Gets plugin info for an individual plugin and filters the plugins using |
| 67 // the |context| and renderer IDs. This will report whether the data is stale | 71 // the |context| and renderer IDs. This will report whether the data is stale |
| 68 // via |is_stale| and returns whether or not the plugin can be found. | 72 // via |is_stale| and returns whether or not the plugin can be found. |
| 69 virtual bool GetPluginInfo(int render_process_id, | 73 virtual bool GetPluginInfo(int render_process_id, |
| 70 int render_frame_id, | 74 int render_frame_id, |
| 71 ResourceContext* context, | 75 ResourceContext* context, |
| 72 const GURL& url, | 76 const GURL& url, |
| 73 const GURL& page_url, | 77 const url::Origin& main_frame_origin, |
| 74 const std::string& mime_type, | 78 const std::string& mime_type, |
| 75 bool allow_wildcard, | 79 bool allow_wildcard, |
| 76 bool* is_stale, | 80 bool* is_stale, |
| 77 WebPluginInfo* info, | 81 WebPluginInfo* info, |
| 78 std::string* actual_mime_type) = 0; | 82 std::string* actual_mime_type) = 0; |
| 79 | 83 |
| 80 // Get plugin info by plugin path (including disabled plugins). Returns true | 84 // Get plugin info by plugin path (including disabled plugins). Returns true |
| 81 // if the plugin is found and WebPluginInfo has been filled in |info|. This | 85 // if the plugin is found and WebPluginInfo has been filled in |info|. This |
| 82 // will use cached data in the plugin list. | 86 // will use cached data in the plugin list. |
| 83 virtual bool GetPluginInfoByPath(const base::FilePath& plugin_path, | 87 virtual bool GetPluginInfoByPath(const base::FilePath& plugin_path, |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 virtual void GetInternalPlugins(std::vector<WebPluginInfo>* plugins) = 0; | 130 virtual void GetInternalPlugins(std::vector<WebPluginInfo>* plugins) = 0; |
| 127 | 131 |
| 128 // Returns true iff PPAPI "dev channel" methods are supported. | 132 // Returns true iff PPAPI "dev channel" methods are supported. |
| 129 virtual bool PpapiDevChannelSupported(BrowserContext* browser_context, | 133 virtual bool PpapiDevChannelSupported(BrowserContext* browser_context, |
| 130 const GURL& document_url) = 0; | 134 const GURL& document_url) = 0; |
| 131 }; | 135 }; |
| 132 | 136 |
| 133 } // namespace content | 137 } // namespace content |
| 134 | 138 |
| 135 #endif // CONTENT_PUBLIC_BROWSER_PLUGIN_SERVICE_H_ | 139 #endif // CONTENT_PUBLIC_BROWSER_PLUGIN_SERVICE_H_ |
| OLD | NEW |