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 "extensions/features/features.h" |
21 #include "ppapi/features/features.h" | 22 #include "ppapi/features/features.h" |
22 | 23 |
23 struct ChromeViewHostMsg_GetPluginInfo_Output; | 24 struct ChromeViewHostMsg_GetPluginInfo_Output; |
24 enum class ChromeViewHostMsg_GetPluginInfo_Status; | 25 enum class ChromeViewHostMsg_GetPluginInfo_Status; |
25 class GURL; | 26 class GURL; |
26 class HostContentSettingsMap; | 27 class HostContentSettingsMap; |
27 class PluginFinder; | 28 class PluginFinder; |
28 class PluginMetadata; | 29 class PluginMetadata; |
29 class Profile; | 30 class Profile; |
30 | 31 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 content::WebPluginInfo* plugin, | 76 content::WebPluginInfo* plugin, |
76 std::string* actual_mime_type, | 77 std::string* actual_mime_type, |
77 std::unique_ptr<PluginMetadata>* plugin_metadata) const; | 78 std::unique_ptr<PluginMetadata>* plugin_metadata) const; |
78 void MaybeGrantAccess(ChromeViewHostMsg_GetPluginInfo_Status status, | 79 void MaybeGrantAccess(ChromeViewHostMsg_GetPluginInfo_Status status, |
79 const base::FilePath& path) const; | 80 const base::FilePath& path) const; |
80 bool IsPluginEnabled(const content::WebPluginInfo& plugin) const; | 81 bool IsPluginEnabled(const content::WebPluginInfo& plugin) const; |
81 | 82 |
82 private: | 83 private: |
83 int render_process_id_; | 84 int render_process_id_; |
84 content::ResourceContext* resource_context_; | 85 content::ResourceContext* resource_context_; |
85 #if defined(ENABLE_EXTENSIONS) | 86 #if BUILDFLAG(ENABLE_EXTENSIONS) |
86 extensions::ExtensionRegistry* extension_registry_; | 87 extensions::ExtensionRegistry* extension_registry_; |
87 #endif | 88 #endif |
88 const HostContentSettingsMap* host_content_settings_map_; | 89 const HostContentSettingsMap* host_content_settings_map_; |
89 scoped_refptr<PluginPrefs> plugin_prefs_; | 90 scoped_refptr<PluginPrefs> plugin_prefs_; |
90 | 91 |
91 BooleanPrefMember allow_outdated_plugins_; | 92 BooleanPrefMember allow_outdated_plugins_; |
92 BooleanPrefMember always_authorize_plugins_; | 93 BooleanPrefMember always_authorize_plugins_; |
93 }; | 94 }; |
94 | 95 |
95 PluginInfoMessageFilter(int render_process_id, Profile* profile); | 96 PluginInfoMessageFilter(int render_process_id, Profile* profile); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 | 148 |
148 Context context_; | 149 Context context_; |
149 | 150 |
150 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; | 151 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; |
151 base::WeakPtrFactory<PluginInfoMessageFilter> weak_ptr_factory_; | 152 base::WeakPtrFactory<PluginInfoMessageFilter> weak_ptr_factory_; |
152 | 153 |
153 DISALLOW_COPY_AND_ASSIGN(PluginInfoMessageFilter); | 154 DISALLOW_COPY_AND_ASSIGN(PluginInfoMessageFilter); |
154 }; | 155 }; |
155 | 156 |
156 #endif // CHROME_BROWSER_PLUGINS_PLUGIN_INFO_MESSAGE_FILTER_H_ | 157 #endif // CHROME_BROWSER_PLUGINS_PLUGIN_INFO_MESSAGE_FILTER_H_ |
OLD | NEW |