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 #include "chrome/browser/ui/webui/plugins_ui.h" | 5 #include "chrome/browser/ui/webui/plugins_ui.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "chrome/browser/plugins/plugin_finder.h" | 27 #include "chrome/browser/plugins/plugin_finder.h" |
28 #include "chrome/browser/plugins/plugin_metadata.h" | 28 #include "chrome/browser/plugins/plugin_metadata.h" |
29 #include "chrome/browser/plugins/plugin_prefs.h" | 29 #include "chrome/browser/plugins/plugin_prefs.h" |
30 #include "chrome/browser/profiles/profile.h" | 30 #include "chrome/browser/profiles/profile.h" |
31 #include "chrome/browser/ui/browser.h" | 31 #include "chrome/browser/ui/browser.h" |
32 #include "chrome/browser/ui/browser_window.h" | 32 #include "chrome/browser/ui/browser_window.h" |
33 #include "chrome/common/chrome_content_client.h" | 33 #include "chrome/common/chrome_content_client.h" |
34 #include "chrome/common/chrome_paths.h" | 34 #include "chrome/common/chrome_paths.h" |
35 #include "chrome/common/pref_names.h" | 35 #include "chrome/common/pref_names.h" |
36 #include "chrome/common/url_constants.h" | 36 #include "chrome/common/url_constants.h" |
| 37 #include "chrome/grit/generated_resources.h" |
37 #include "components/pref_registry/pref_registry_syncable.h" | 38 #include "components/pref_registry/pref_registry_syncable.h" |
38 #include "content/public/browser/notification_source.h" | 39 #include "content/public/browser/notification_source.h" |
39 #include "content/public/browser/plugin_service.h" | 40 #include "content/public/browser/plugin_service.h" |
40 #include "content/public/browser/web_contents.h" | 41 #include "content/public/browser/web_contents.h" |
41 #include "content/public/browser/web_ui.h" | 42 #include "content/public/browser/web_ui.h" |
42 #include "content/public/browser/web_ui_data_source.h" | 43 #include "content/public/browser/web_ui_data_source.h" |
43 #include "content/public/browser/web_ui_message_handler.h" | 44 #include "content/public/browser/web_ui_message_handler.h" |
44 #include "content/public/common/content_constants.h" | 45 #include "content/public/common/content_constants.h" |
45 #include "grit/browser_resources.h" | 46 #include "grit/browser_resources.h" |
46 #include "grit/generated_resources.h" | |
47 #include "grit/theme_resources.h" | 47 #include "grit/theme_resources.h" |
48 #include "ui/base/l10n/l10n_util.h" | 48 #include "ui/base/l10n/l10n_util.h" |
49 #include "ui/base/resource/resource_bundle.h" | 49 #include "ui/base/resource/resource_bundle.h" |
50 | 50 |
51 #if defined(OS_CHROMEOS) | 51 #if defined(OS_CHROMEOS) |
52 #include "chrome/browser/ui/webui/chromeos/ui_account_tweaks.h" | 52 #include "chrome/browser/ui/webui/chromeos/ui_account_tweaks.h" |
53 #endif | 53 #endif |
54 | 54 |
55 using content::PluginService; | 55 using content::PluginService; |
56 using content::WebContents; | 56 using content::WebContents; |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 // | 134 // |
135 //////////////////////////////////////////////////////////////////////////////// | 135 //////////////////////////////////////////////////////////////////////////////// |
136 | 136 |
137 // The handler for Javascript messages for the chrome://plugins/ page. | 137 // The handler for Javascript messages for the chrome://plugins/ page. |
138 // TODO(viettrungluu): Make plugin list updates notify, and then observe | 138 // TODO(viettrungluu): Make plugin list updates notify, and then observe |
139 // changes; maybe replumb plugin list through plugin service? | 139 // changes; maybe replumb plugin list through plugin service? |
140 // <http://crbug.com/39101> | 140 // <http://crbug.com/39101> |
141 class PluginsDOMHandler : public WebUIMessageHandler, | 141 class PluginsDOMHandler : public WebUIMessageHandler, |
142 public content::NotificationObserver { | 142 public content::NotificationObserver { |
143 public: | 143 public: |
144 explicit PluginsDOMHandler(); | 144 PluginsDOMHandler(); |
145 virtual ~PluginsDOMHandler() {} | 145 virtual ~PluginsDOMHandler() {} |
146 | 146 |
147 // WebUIMessageHandler implementation. | 147 // WebUIMessageHandler implementation. |
148 virtual void RegisterMessages() OVERRIDE; | 148 virtual void RegisterMessages() OVERRIDE; |
149 | 149 |
150 // Callback for the "requestPluginsData" message. | 150 // Callback for the "requestPluginsData" message. |
151 void HandleRequestPluginsData(const base::ListValue* args); | 151 void HandleRequestPluginsData(const base::ListValue* args); |
152 | 152 |
153 // Callback for the "enablePlugin" message. | 153 // Callback for the "enablePlugin" message. |
154 void HandleEnablePluginMessage(const base::ListValue* args); | 154 void HandleEnablePluginMessage(const base::ListValue* args); |
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 void PluginsUI::RegisterProfilePrefs( | 517 void PluginsUI::RegisterProfilePrefs( |
518 user_prefs::PrefRegistrySyncable* registry) { | 518 user_prefs::PrefRegistrySyncable* registry) { |
519 registry->RegisterBooleanPref( | 519 registry->RegisterBooleanPref( |
520 prefs::kPluginsShowDetails, | 520 prefs::kPluginsShowDetails, |
521 false, | 521 false, |
522 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 522 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
523 registry->RegisterDictionaryPref( | 523 registry->RegisterDictionaryPref( |
524 prefs::kContentSettingsPluginWhitelist, | 524 prefs::kContentSettingsPluginWhitelist, |
525 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 525 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
526 } | 526 } |
OLD | NEW |