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

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

Issue 7058048: [cros] Layout for OOBE WebUI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: refactoring Created 9 years, 6 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
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/network_screen_handler.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/login/oobe_ui.h" 5 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/ref_counted_memory.h" 10 #include "base/memory/ref_counted_memory.h"
11 #include "base/values.h" 11 #include "base/values.h"
12 #include "chrome/browser/chromeos/login/wizard_controller.h" 12 #include "chrome/browser/chromeos/login/wizard_controller.h"
13 #include "chrome/browser/profiles/profile.h" 13 #include "chrome/browser/profiles/profile.h"
14 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" 14 #include "chrome/browser/ui/webui/chrome_url_data_manager.h"
15 #include "chrome/browser/ui/webui/chromeos/login/eula_screen_handler.h" 15 #include "chrome/browser/ui/webui/chromeos/login/eula_screen_handler.h"
16 #include "chrome/browser/ui/webui/chromeos/login/network_screen_handler.h" 16 #include "chrome/browser/ui/webui/chromeos/login/network_screen_handler.h"
17 #include "chrome/common/jstemplate_builder.h" 17 #include "chrome/common/jstemplate_builder.h"
18 #include "chrome/common/url_constants.h" 18 #include "chrome/common/url_constants.h"
19 #include "content/browser/tab_contents/tab_contents.h" 19 #include "content/browser/tab_contents/tab_contents.h"
20 #include "grit/browser_resources.h" 20 #include "grit/browser_resources.h"
21 #include "grit/chromium_strings.h"
22 #include "grit/generated_resources.h"
23 #include "ui/base/l10n/l10n_util.h"
21 #include "ui/base/resource/resource_bundle.h" 24 #include "ui/base/resource/resource_bundle.h"
22 25
23 namespace { 26 namespace {
24 27
25 // JS API callbacks names. 28 // JS API callbacks names.
26 const char kJsApiScreenStateInitialize[] = "screenStateInitialize"; 29 const char kJsApiScreenStateInitialize[] = "screenStateInitialize";
27 30
28 } // namespace 31 } // namespace
29 32
30 namespace chromeos { 33 namespace chromeos {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 // CoreOobeHandler ------------------------------------------------------------ 110 // CoreOobeHandler ------------------------------------------------------------
108 111
109 CoreOobeHandler::CoreOobeHandler(OobeUI* oobe_ui) 112 CoreOobeHandler::CoreOobeHandler(OobeUI* oobe_ui)
110 : oobe_ui_(oobe_ui) { 113 : oobe_ui_(oobe_ui) {
111 } 114 }
112 115
113 CoreOobeHandler::~CoreOobeHandler() { 116 CoreOobeHandler::~CoreOobeHandler() {
114 } 117 }
115 118
116 void CoreOobeHandler::GetLocalizedSettings(DictionaryValue* localized_strings) { 119 void CoreOobeHandler::GetLocalizedSettings(DictionaryValue* localized_strings) {
120 localized_strings->SetString("productName",
121 l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME));
122 localized_strings->SetString("updateScreenTitle",
123 l10n_util::GetStringUTF16(IDS_UPDATE_SCREEN_TITLE));
124 localized_strings->SetString("installingUpdate",
125 l10n_util::GetStringFUTF16(IDS_INSTALLING_UPDATE,
126 l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME)));
127 localized_strings->SetString("installingUpdateDesc",
128 l10n_util::GetStringUTF16(IDS_INSTALLING_UPDATE_DESC));
117 } 129 }
118 130
119 void CoreOobeHandler::Initialize() { 131 void CoreOobeHandler::Initialize() {
120 } 132 }
121 133
122 void CoreOobeHandler::RegisterMessages() { 134 void CoreOobeHandler::RegisterMessages() {
123 web_ui_->RegisterMessageCallback(kJsApiScreenStateInitialize, 135 web_ui_->RegisterMessageCallback(kJsApiScreenStateInitialize,
124 NewCallback(this, &CoreOobeHandler::OnInitialized)); 136 NewCallback(this, &CoreOobeHandler::OnInitialized));
125 } 137 }
126 138
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 } 212 }
201 213
202 void OobeUI::InitializeHandlers() { 214 void OobeUI::InitializeHandlers() {
203 // Note, handlers_[0] is a GenericHandler used by the WebUI. 215 // Note, handlers_[0] is a GenericHandler used by the WebUI.
204 for (size_t i = 1; i < handlers_.size(); ++i) { 216 for (size_t i = 1; i < handlers_.size(); ++i) {
205 static_cast<OobeMessageHandler*>(handlers_[i])->Initialize(); 217 static_cast<OobeMessageHandler*>(handlers_[i])->Initialize();
206 } 218 }
207 } 219 }
208 220
209 } // namespace chromeos 221 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/network_screen_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698