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

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

Issue 7121013: Initial implementation of network screen WebUI handler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed compile 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/network_screen_handler.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/chromeos/login/oobe_ui.cc
diff --git a/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc b/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc
index aa2f47d84708b53ead7707b0828038da5c305d2f..5ab9f6e1c022825e01476b4b6cd1b6ca36d1de47 100644
--- a/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc
@@ -7,18 +7,17 @@
#include <string>
#include "base/logging.h"
+#include "base/memory/ref_counted_memory.h"
#include "base/values.h"
#include "chrome/browser/chromeos/login/wizard_controller.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/webui/chrome_url_data_manager.h"
#include "chrome/browser/ui/webui/chromeos/login/eula_screen_handler.h"
+#include "chrome/browser/ui/webui/chromeos/login/network_screen_handler.h"
#include "chrome/common/jstemplate_builder.h"
#include "chrome/common/url_constants.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "grit/browser_resources.h"
-#include "grit/chromium_strings.h"
-#include "grit/generated_resources.h"
-#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
namespace {
@@ -115,22 +114,6 @@ CoreOobeHandler::~CoreOobeHandler() {
}
void CoreOobeHandler::GetLocalizedSettings(DictionaryValue* localized_strings) {
- // OOBE title is not actually seen in UI, use title of the welcome screen.
- // TODO(altimofeev): move the strings to the corresponding handlers, when
- // they will be ready.
- localized_strings->SetString("title",
- l10n_util::GetStringUTF16(IDS_NETWORK_SELECTION_TITLE));
- localized_strings->SetString("welcomeScreenTitle",
- l10n_util::GetStringFUTF16(IDS_WELCOME_SCREEN_TITLE,
- l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME)));
- localized_strings->SetString("languageSelect",
- l10n_util::GetStringUTF16(IDS_LANGUAGE_SELECTION_SELECT));
- localized_strings->SetString("keyboardSelect",
- l10n_util::GetStringUTF16(IDS_KEYBOARD_SELECTION_SELECT));
- localized_strings->SetString("networkSelect",
- l10n_util::GetStringUTF16(IDS_NETWORK_SELECTION_SELECT));
- localized_strings->SetString("continue",
- l10n_util::GetStringUTF16(IDS_NETWORK_SELECTION_CONTINUE_BUTTON));
}
void CoreOobeHandler::Initialize() {
@@ -156,6 +139,10 @@ OobeUI::OobeUI(TabContents* contents)
AddOobeMessageHandler(new CoreOobeHandler(this), localized_strings.get());
+ NetworkScreenHandler* network_screen_handler = new NetworkScreenHandler;
+ network_screen_actor_ = network_screen_handler;
+ AddOobeMessageHandler(network_screen_handler, localized_strings.get());
+
EulaScreenHandler* eula_screen_handler = new EulaScreenHandler;
eula_screen_actor_ = eula_screen_handler;
AddOobeMessageHandler(eula_screen_handler, localized_strings.get());
@@ -213,10 +200,9 @@ void OobeUI::AddOobeMessageHandler(OobeMessageHandler* handler,
}
void OobeUI::InitializeHandlers() {
- std::vector<WebUIMessageHandler*>::iterator iter;
// Note, handlers_[0] is a GenericHandler used by the WebUI.
- for (iter = handlers_.begin() + 1; iter != handlers_.end(); ++iter) {
- (static_cast<OobeMessageHandler*>(*iter))->Initialize();
+ for (size_t i = 1; i < handlers_.size(); ++i) {
+ static_cast<OobeMessageHandler*>(handlers_[i])->Initialize();
}
}
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/network_screen_handler.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698