OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_PLUGIN_UPDATER_H_ | 5 #ifndef CHROME_BROWSER_PLUGIN_UPDATER_H_ |
6 #define CHROME_BROWSER_PLUGIN_UPDATER_H_ | 6 #define CHROME_BROWSER_PLUGIN_UPDATER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 virtual ~PluginUpdater() {} | 52 virtual ~PluginUpdater() {} |
53 | 53 |
54 // Called on the file thread to get the data necessary to update the saved | 54 // Called on the file thread to get the data necessary to update the saved |
55 // preferences. The profile pointer is only to be passed to the UI thread. | 55 // preferences. The profile pointer is only to be passed to the UI thread. |
56 static void GetPreferencesDataOnFileThread(void* profile); | 56 static void GetPreferencesDataOnFileThread(void* profile); |
57 | 57 |
58 // Called on the UI thread with the plugin data to save the preferences. | 58 // Called on the UI thread with the plugin data to save the preferences. |
59 static void OnUpdatePreferences( | 59 static void OnUpdatePreferences( |
60 Profile* profile, | 60 Profile* profile, |
61 const std::vector<WebPluginInfo>& plugins, | 61 const std::vector<WebPluginInfo>& plugins, |
62 const std::vector<PluginGroup>& groups); | 62 const std::vector<PluginGroup>& groups, |
| 63 const NPAPI::PluginList::DisabledPluginsList& disabled_plugins, |
| 64 const NPAPI::PluginList::DisabledGroupsList& disabled_groups); |
63 | 65 |
64 // Queues sending the notification that plugin data has changed. This is done | 66 // Queues sending the notification that plugin data has changed. This is done |
65 // so that if a bunch of changes happen, we only send one notification. | 67 // so that if a bunch of changes happen, we only send one notification. |
66 void NotifyPluginStatusChanged(); | 68 void NotifyPluginStatusChanged(); |
67 | 69 |
68 // Used for the post task to notify that plugin enabled status changed. | 70 // Used for the post task to notify that plugin enabled status changed. |
69 static void OnNotifyPluginStatusChanged(); | 71 static void OnNotifyPluginStatusChanged(); |
70 | 72 |
71 static DictionaryValue* CreatePluginFileSummary(const WebPluginInfo& plugin); | 73 static DictionaryValue* CreatePluginFileSummary(const WebPluginInfo& plugin); |
72 | 74 |
73 // Force plugins to be disabled due to policy. |plugins| contains | 75 // Force plugins to be disabled due to policy. |plugins| contains |
74 // the list of StringValues of the names of the policy-disabled plugins. | 76 // the list of StringValues of the names of the policy-disabled plugins. |
75 void DisablePluginsFromPolicy(const ListValue* plugin_names); | 77 void DisablePluginsFromPolicy(const ListValue* plugin_names); |
76 | 78 |
77 // Needed to allow singleton instantiation using private constructor. | 79 // Needed to allow singleton instantiation using private constructor. |
78 friend struct DefaultSingletonTraits<PluginUpdater>; | 80 friend struct DefaultSingletonTraits<PluginUpdater>; |
79 | 81 |
80 // Note: if you change this to false from true, you must update | 82 // Note: if you change this to false from true, you must update |
81 // kPluginsEnabledInternalPDF to be a new name (i.e. add 2, 3, 4...) at end. | 83 // kPluginsEnabledInternalPDF to be a new name (i.e. add 2, 3, 4...) at end. |
82 bool enable_internal_pdf_; | 84 bool enable_internal_pdf_; |
83 | 85 |
84 bool notify_pending_; | 86 bool notify_pending_; |
85 | 87 |
86 DISALLOW_COPY_AND_ASSIGN(PluginUpdater); | 88 DISALLOW_COPY_AND_ASSIGN(PluginUpdater); |
87 }; | 89 }; |
88 | 90 |
89 #endif // CHROME_BROWSER_PLUGIN_UPDATER_H_ | 91 #endif // CHROME_BROWSER_PLUGIN_UPDATER_H_ |
OLD | NEW |