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

Side by Side Diff: chrome/browser/ui/webui/chromeos/proxy_settings_ui.cc

Issue 144983002: Fixed chrome://settings/accounts availability for MP. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed proxy_settings_ui. Created 6 years, 10 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/chromeos/proxy_settings_ui.h" 5 #include "chrome/browser/ui/webui/chromeos/proxy_settings_ui.h"
6 6
7 #include "base/memory/ref_counted_memory.h" 7 #include "base/memory/ref_counted_memory.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/chromeos/system/input_device_settings.h" 10 #include "chrome/browser/chromeos/system/input_device_settings.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 namespace chromeos { 85 namespace chromeos {
86 86
87 ProxySettingsUI::ProxySettingsUI(content::WebUI* web_ui) 87 ProxySettingsUI::ProxySettingsUI(content::WebUI* web_ui)
88 : WebUIController(web_ui), 88 : WebUIController(web_ui),
89 initialized_handlers_(false), 89 initialized_handlers_(false),
90 proxy_handler_(new options::ProxyHandler()), 90 proxy_handler_(new options::ProxyHandler()),
91 core_handler_(new options::CoreChromeOSOptionsHandler()) { 91 core_handler_(new options::CoreChromeOSOptionsHandler()) {
92 // |localized_strings| will be owned by ProxySettingsHTMLSource. 92 // |localized_strings| will be owned by ProxySettingsHTMLSource.
93 base::DictionaryValue* localized_strings = new base::DictionaryValue(); 93 base::DictionaryValue* localized_strings = new base::DictionaryValue();
94 94
95 web_ui->AddMessageHandler(core_handler_);
95 core_handler_->set_handlers_host(this); 96 core_handler_->set_handlers_host(this);
96 core_handler_->GetLocalizedValues(localized_strings); 97 core_handler_->GetLocalizedValues(localized_strings);
97 web_ui->AddMessageHandler(core_handler_);
98 98
99 web_ui->AddMessageHandler(proxy_handler_);
99 proxy_handler_->GetLocalizedValues(localized_strings); 100 proxy_handler_->GetLocalizedValues(localized_strings);
100 web_ui->AddMessageHandler(proxy_handler_);
101 101
102 bool keyboard_driven_oobe = 102 bool keyboard_driven_oobe =
103 system::keyboard_settings::ForceKeyboardDrivenUINavigation(); 103 system::keyboard_settings::ForceKeyboardDrivenUINavigation();
104 localized_strings->SetString("highlightStrength", 104 localized_strings->SetString("highlightStrength",
105 keyboard_driven_oobe ? "strong" : "normal"); 105 keyboard_driven_oobe ? "strong" : "normal");
106 106
107 ProxySettingsHTMLSource* source = 107 ProxySettingsHTMLSource* source =
108 new ProxySettingsHTMLSource(localized_strings); 108 new ProxySettingsHTMLSource(localized_strings);
109 Profile* profile = Profile::FromWebUI(web_ui); 109 Profile* profile = Profile::FromWebUI(web_ui);
110 content::URLDataSource::Add(profile, source); 110 content::URLDataSource::Add(profile, source);
(...skipping 13 matching lines...) Expand all
124 if (!initialized_handlers_) { 124 if (!initialized_handlers_) {
125 core_handler_->InitializeHandler(); 125 core_handler_->InitializeHandler();
126 proxy_handler_->InitializeHandler(); 126 proxy_handler_->InitializeHandler();
127 initialized_handlers_ = true; 127 initialized_handlers_ = true;
128 } 128 }
129 core_handler_->InitializePage(); 129 core_handler_->InitializePage();
130 proxy_handler_->InitializePage(); 130 proxy_handler_->InitializePage();
131 } 131 }
132 132
133 } // namespace chromeos 133 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/profiles/profile_helper.cc ('k') | chrome/browser/ui/webui/chromeos/ui_account_tweaks.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698