Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(131)

Side by Side Diff: chrome/browser/ui/webui/options2/core_options_handler2.cc

Issue 9693032: [uber page] Split up initialization of handlers from initialization of webui pages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698