| 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 // | 130 // |
| 131 //////////////////////////////////////////////////////////////////////////////// | 131 //////////////////////////////////////////////////////////////////////////////// |
| 132 | 132 |
| 133 // The handler for Javascript messages for the chrome://plugins/ page. | 133 // The handler for Javascript messages for the chrome://plugins/ page. |
| 134 // TODO(viettrungluu): Make plugin list updates notify, and then observe | 134 // TODO(viettrungluu): Make plugin list updates notify, and then observe |
| 135 // changes; maybe replumb plugin list through plugin service? | 135 // changes; maybe replumb plugin list through plugin service? |
| 136 // <http://crbug.com/39101> | 136 // <http://crbug.com/39101> |
| 137 class PluginsDOMHandler : public WebUIMessageHandler, | 137 class PluginsDOMHandler : public WebUIMessageHandler, |
| 138 public content::NotificationObserver { | 138 public content::NotificationObserver { |
| 139 public: | 139 public: |
| 140 explicit PluginsDOMHandler(); | 140 PluginsDOMHandler(); |
| 141 virtual ~PluginsDOMHandler() {} | 141 virtual ~PluginsDOMHandler() {} |
| 142 | 142 |
| 143 // WebUIMessageHandler implementation. | 143 // WebUIMessageHandler implementation. |
| 144 virtual void RegisterMessages() OVERRIDE; | 144 virtual void RegisterMessages() OVERRIDE; |
| 145 | 145 |
| 146 // Callback for the "requestPluginsData" message. | 146 // Callback for the "requestPluginsData" message. |
| 147 void HandleRequestPluginsData(const ListValue* args); | 147 void HandleRequestPluginsData(const ListValue* args); |
| 148 | 148 |
| 149 // Callback for the "enablePlugin" message. | 149 // Callback for the "enablePlugin" message. |
| 150 void HandleEnablePluginMessage(const ListValue* args); | 150 void HandleEnablePluginMessage(const ListValue* args); |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 491 } | 491 } |
| 492 | 492 |
| 493 // static | 493 // static |
| 494 void PluginsUI::RegisterUserPrefs(PrefServiceSyncable* prefs) { | 494 void PluginsUI::RegisterUserPrefs(PrefServiceSyncable* prefs) { |
| 495 prefs->RegisterBooleanPref(prefs::kPluginsShowDetails, | 495 prefs->RegisterBooleanPref(prefs::kPluginsShowDetails, |
| 496 false, | 496 false, |
| 497 PrefServiceSyncable::UNSYNCABLE_PREF); | 497 PrefServiceSyncable::UNSYNCABLE_PREF); |
| 498 prefs->RegisterDictionaryPref(prefs::kContentSettingsPluginWhitelist, | 498 prefs->RegisterDictionaryPref(prefs::kContentSettingsPluginWhitelist, |
| 499 PrefServiceSyncable::SYNCABLE_PREF); | 499 PrefServiceSyncable::SYNCABLE_PREF); |
| 500 } | 500 } |
| OLD | NEW |