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 CHROME_BROWSER_PLUGINS_PLUGIN_INFO_MESSAGE_FILTER_H_ | 5 #ifndef CHROME_BROWSER_PLUGINS_PLUGIN_INFO_MESSAGE_FILTER_H_ |
6 #define CHROME_BROWSER_PLUGINS_PLUGIN_INFO_MESSAGE_FILTER_H_ | 6 #define CHROME_BROWSER_PLUGINS_PLUGIN_INFO_MESSAGE_FILTER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
16 #include "base/sequenced_task_runner_helpers.h" | 16 #include "base/sequenced_task_runner_helpers.h" |
17 #include "chrome/browser/plugins/plugin_prefs.h" | 17 #include "chrome/browser/plugins/plugin_prefs.h" |
18 #include "components/content_settings/core/common/content_settings.h" | 18 #include "components/content_settings/core/common/content_settings.h" |
19 #include "components/prefs/pref_member.h" | 19 #include "components/prefs/pref_member.h" |
20 #include "content/public/browser/browser_message_filter.h" | 20 #include "content/public/browser/browser_message_filter.h" |
21 #include "ppapi/features/features.h" | |
22 | 21 |
23 struct ChromeViewHostMsg_GetPluginInfo_Output; | 22 struct ChromeViewHostMsg_GetPluginInfo_Output; |
24 enum class ChromeViewHostMsg_GetPluginInfo_Status; | 23 enum class ChromeViewHostMsg_GetPluginInfo_Status; |
25 class GURL; | 24 class GURL; |
26 class HostContentSettingsMap; | 25 class HostContentSettingsMap; |
27 class PluginFinder; | 26 class PluginFinder; |
28 class PluginMetadata; | 27 class PluginMetadata; |
29 class Profile; | 28 class Profile; |
30 | 29 |
31 namespace base { | 30 namespace base { |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 std::unique_ptr<PluginMetadata> plugin_metadata, | 122 std::unique_ptr<PluginMetadata> plugin_metadata, |
124 IPC::Message* reply_msg, | 123 IPC::Message* reply_msg, |
125 std::unique_ptr<component_updater::ComponentInfo> cus_plugin_info); | 124 std::unique_ptr<component_updater::ComponentInfo> cus_plugin_info); |
126 | 125 |
127 void GetPluginInfoReply( | 126 void GetPluginInfoReply( |
128 const GetPluginInfo_Params& params, | 127 const GetPluginInfo_Params& params, |
129 std::unique_ptr<ChromeViewHostMsg_GetPluginInfo_Output> output, | 128 std::unique_ptr<ChromeViewHostMsg_GetPluginInfo_Output> output, |
130 std::unique_ptr<PluginMetadata> plugin_metadata, | 129 std::unique_ptr<PluginMetadata> plugin_metadata, |
131 IPC::Message* reply_msg); | 130 IPC::Message* reply_msg); |
132 | 131 |
133 #if BUILDFLAG(ENABLE_PEPPER_CDMS) | 132 #if defined(ENABLE_PEPPER_CDMS) |
134 // Returns whether any internal plugin supporting |mime_type| is registered | 133 // Returns whether any internal plugin supporting |mime_type| is registered |
135 // and enabled. Does not determine whether the plugin can actually be | 134 // and enabled. Does not determine whether the plugin can actually be |
136 // instantiated (e.g. whether it has all its dependencies). | 135 // instantiated (e.g. whether it has all its dependencies). |
137 // When the returned *|is_available| is true, |additional_param_names| and | 136 // When the returned *|is_available| is true, |additional_param_names| and |
138 // |additional_param_values| contain the name-value pairs, if any, specified | 137 // |additional_param_values| contain the name-value pairs, if any, specified |
139 // for the *first* non-disabled plugin found that is registered for | 138 // for the *first* non-disabled plugin found that is registered for |
140 // |mime_type|. | 139 // |mime_type|. |
141 void OnIsInternalPluginAvailableForMimeType( | 140 void OnIsInternalPluginAvailableForMimeType( |
142 const std::string& mime_type, | 141 const std::string& mime_type, |
143 bool* is_available, | 142 bool* is_available, |
144 std::vector<base::string16>* additional_param_names, | 143 std::vector<base::string16>* additional_param_names, |
145 std::vector<base::string16>* additional_param_values); | 144 std::vector<base::string16>* additional_param_values); |
146 #endif | 145 #endif |
147 | 146 |
148 Context context_; | 147 Context context_; |
149 | 148 |
150 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; | 149 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; |
151 base::WeakPtrFactory<PluginInfoMessageFilter> weak_ptr_factory_; | 150 base::WeakPtrFactory<PluginInfoMessageFilter> weak_ptr_factory_; |
152 | 151 |
153 DISALLOW_COPY_AND_ASSIGN(PluginInfoMessageFilter); | 152 DISALLOW_COPY_AND_ASSIGN(PluginInfoMessageFilter); |
154 }; | 153 }; |
155 | 154 |
156 #endif // CHROME_BROWSER_PLUGINS_PLUGIN_INFO_MESSAGE_FILTER_H_ | 155 #endif // CHROME_BROWSER_PLUGINS_PLUGIN_INFO_MESSAGE_FILTER_H_ |
OLD | NEW |