Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Side by Side Diff: chrome/browser/plugins/plugin_info_message_filter.h

Issue 2409423002: Move ENABLE_PEPPER_CDMS to a buildflag header. (Closed)
Patch Set: Fix and format Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
21 22
22 struct ChromeViewHostMsg_GetPluginInfo_Output; 23 struct ChromeViewHostMsg_GetPluginInfo_Output;
23 enum class ChromeViewHostMsg_GetPluginInfo_Status; 24 enum class ChromeViewHostMsg_GetPluginInfo_Status;
24 class GURL; 25 class GURL;
25 class HostContentSettingsMap; 26 class HostContentSettingsMap;
26 class PluginFinder; 27 class PluginFinder;
27 class PluginMetadata; 28 class PluginMetadata;
28 class Profile; 29 class Profile;
29 30
30 namespace base { 31 namespace base {
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 std::unique_ptr<PluginMetadata> plugin_metadata, 123 std::unique_ptr<PluginMetadata> plugin_metadata,
123 IPC::Message* reply_msg, 124 IPC::Message* reply_msg,
124 std::unique_ptr<component_updater::ComponentInfo> cus_plugin_info); 125 std::unique_ptr<component_updater::ComponentInfo> cus_plugin_info);
125 126
126 void GetPluginInfoReply( 127 void GetPluginInfoReply(
127 const GetPluginInfo_Params& params, 128 const GetPluginInfo_Params& params,
128 std::unique_ptr<ChromeViewHostMsg_GetPluginInfo_Output> output, 129 std::unique_ptr<ChromeViewHostMsg_GetPluginInfo_Output> output,
129 std::unique_ptr<PluginMetadata> plugin_metadata, 130 std::unique_ptr<PluginMetadata> plugin_metadata,
130 IPC::Message* reply_msg); 131 IPC::Message* reply_msg);
131 132
132 #if defined(ENABLE_PEPPER_CDMS) 133 #if BUILDFLAG(ENABLE_PEPPER_CDMS)
133 // Returns whether any internal plugin supporting |mime_type| is registered 134 // Returns whether any internal plugin supporting |mime_type| is registered
134 // and enabled. Does not determine whether the plugin can actually be 135 // and enabled. Does not determine whether the plugin can actually be
135 // instantiated (e.g. whether it has all its dependencies). 136 // instantiated (e.g. whether it has all its dependencies).
136 // When the returned *|is_available| is true, |additional_param_names| and 137 // When the returned *|is_available| is true, |additional_param_names| and
137 // |additional_param_values| contain the name-value pairs, if any, specified 138 // |additional_param_values| contain the name-value pairs, if any, specified
138 // for the *first* non-disabled plugin found that is registered for 139 // for the *first* non-disabled plugin found that is registered for
139 // |mime_type|. 140 // |mime_type|.
140 void OnIsInternalPluginAvailableForMimeType( 141 void OnIsInternalPluginAvailableForMimeType(
141 const std::string& mime_type, 142 const std::string& mime_type,
142 bool* is_available, 143 bool* is_available,
143 std::vector<base::string16>* additional_param_names, 144 std::vector<base::string16>* additional_param_names,
144 std::vector<base::string16>* additional_param_values); 145 std::vector<base::string16>* additional_param_values);
145 #endif 146 #endif
146 147
147 Context context_; 148 Context context_;
148 149
149 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; 150 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_;
150 base::WeakPtrFactory<PluginInfoMessageFilter> weak_ptr_factory_; 151 base::WeakPtrFactory<PluginInfoMessageFilter> weak_ptr_factory_;
151 152
152 DISALLOW_COPY_AND_ASSIGN(PluginInfoMessageFilter); 153 DISALLOW_COPY_AND_ASSIGN(PluginInfoMessageFilter);
153 }; 154 };
154 155
155 #endif // CHROME_BROWSER_PLUGINS_PLUGIN_INFO_MESSAGE_FILTER_H_ 156 #endif // CHROME_BROWSER_PLUGINS_PLUGIN_INFO_MESSAGE_FILTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698