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/options2/core_options_handler2.h" | 5 #include "chrome/browser/ui/webui/options2/core_options_handler2.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 CoreOptionsHandler::CoreOptionsHandler() | 36 CoreOptionsHandler::CoreOptionsHandler() |
37 : handlers_host_(NULL) { | 37 : handlers_host_(NULL) { |
38 } | 38 } |
39 | 39 |
40 CoreOptionsHandler::~CoreOptionsHandler() {} | 40 CoreOptionsHandler::~CoreOptionsHandler() {} |
41 | 41 |
42 void CoreOptionsHandler::Initialize() { | 42 void CoreOptionsHandler::Initialize() { |
43 clear_plugin_lso_data_enabled_.Init(prefs::kClearPluginLSODataEnabled, | 43 clear_plugin_lso_data_enabled_.Init(prefs::kClearPluginLSODataEnabled, |
44 Profile::FromWebUI(web_ui()), | 44 Profile::FromWebUI(web_ui()), |
45 this); | 45 this); |
| 46 } |
| 47 |
| 48 void CoreOptionsHandler::SendPageValues() { |
46 UpdateClearPluginLSOData(); | 49 UpdateClearPluginLSOData(); |
47 } | 50 } |
48 | 51 |
49 void CoreOptionsHandler::GetLocalizedValues( | 52 void CoreOptionsHandler::GetLocalizedValues( |
50 DictionaryValue* localized_strings) { | 53 DictionaryValue* localized_strings) { |
51 GetStaticLocalizedValues(localized_strings); | 54 GetStaticLocalizedValues(localized_strings); |
52 } | 55 } |
53 | 56 |
54 void CoreOptionsHandler::GetStaticLocalizedValues( | 57 void CoreOptionsHandler::GetStaticLocalizedValues( |
55 base::DictionaryValue* localized_strings) { | 58 base::DictionaryValue* localized_strings) { |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 | 457 |
455 void CoreOptionsHandler::UpdateClearPluginLSOData() { | 458 void CoreOptionsHandler::UpdateClearPluginLSOData() { |
456 scoped_ptr<base::Value> enabled( | 459 scoped_ptr<base::Value> enabled( |
457 base::Value::CreateBooleanValue( | 460 base::Value::CreateBooleanValue( |
458 clear_plugin_lso_data_enabled_.GetValue())); | 461 clear_plugin_lso_data_enabled_.GetValue())); |
459 web_ui()->CallJavascriptFunction( | 462 web_ui()->CallJavascriptFunction( |
460 "OptionsPage.setClearPluginLSODataEnabled", *enabled); | 463 "OptionsPage.setClearPluginLSODataEnabled", *enabled); |
461 } | 464 } |
462 | 465 |
463 } // namespace options2 | 466 } // namespace options2 |
OLD | NEW |