OLD | NEW |
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/mobile_setup_ui.h" | 5 #include "chrome/browser/ui/webui/chromeos/mobile_setup_ui.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 strings.SetString("activating_header", | 419 strings.SetString("activating_header", |
420 l10n_util::GetStringUTF16(IDS_MOBILE_ACTIVATING_HEADER)); | 420 l10n_util::GetStringUTF16(IDS_MOBILE_ACTIVATING_HEADER)); |
421 strings.SetString("completed_header", | 421 strings.SetString("completed_header", |
422 l10n_util::GetStringUTF16(IDS_MOBILE_COMPLETED_HEADER)); | 422 l10n_util::GetStringUTF16(IDS_MOBILE_COMPLETED_HEADER)); |
423 strings.SetString("please_wait", | 423 strings.SetString("please_wait", |
424 l10n_util::GetStringUTF16(IDS_MOBILE_PLEASE_WAIT)); | 424 l10n_util::GetStringUTF16(IDS_MOBILE_PLEASE_WAIT)); |
425 strings.SetString("completed_text", | 425 strings.SetString("completed_text", |
426 l10n_util::GetStringUTF16(IDS_MOBILE_COMPLETED_TEXT)); | 426 l10n_util::GetStringUTF16(IDS_MOBILE_COMPLETED_TEXT)); |
427 strings.SetString("close_button", | 427 strings.SetString("close_button", |
428 l10n_util::GetStringUTF16(IDS_CLOSE)); | 428 l10n_util::GetStringUTF16(IDS_CLOSE)); |
| 429 strings.SetString("cancel_button", |
| 430 l10n_util::GetStringUTF16(IDS_CANCEL)); |
| 431 strings.SetString("ok_button", |
| 432 l10n_util::GetStringUTF16(IDS_OK)); |
| 433 strings.SetString("cancel_question", |
| 434 l10n_util::GetStringUTF16(IDS_MOBILE_CANCEL_ACTIVATION)); |
429 SetFontAndTextDirection(&strings); | 435 SetFontAndTextDirection(&strings); |
430 | 436 |
431 static const base::StringPiece html( | 437 static const base::StringPiece html( |
432 ResourceBundle::GetSharedInstance().GetRawDataResource( | 438 ResourceBundle::GetSharedInstance().GetRawDataResource( |
433 IDR_MOBILE_SETUP_PAGE_HTML)); | 439 IDR_MOBILE_SETUP_PAGE_HTML)); |
434 | 440 |
435 std::string full_html = jstemplate_builder::GetI18nTemplateHtml(html, | 441 std::string full_html = jstemplate_builder::GetI18nTemplateHtml(html, |
436 &strings); | 442 &strings); |
437 | 443 |
438 SendResponse(request_id, base::RefCountedString::TakeString(&full_html)); | 444 SendResponse(request_id, base::RefCountedString::TakeString(&full_html)); |
(...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1330 MobileSetupHandler* handler = new MobileSetupHandler(service_path); | 1336 MobileSetupHandler* handler = new MobileSetupHandler(service_path); |
1331 AddMessageHandler((handler)->Attach(this)); | 1337 AddMessageHandler((handler)->Attach(this)); |
1332 handler->Init(contents); | 1338 handler->Init(contents); |
1333 MobileSetupUIHTMLSource* html_source = | 1339 MobileSetupUIHTMLSource* html_source = |
1334 new MobileSetupUIHTMLSource(service_path); | 1340 new MobileSetupUIHTMLSource(service_path); |
1335 | 1341 |
1336 // Set up the chrome://mobilesetup/ source. | 1342 // Set up the chrome://mobilesetup/ source. |
1337 Profile* profile = Profile::FromBrowserContext(contents->browser_context()); | 1343 Profile* profile = Profile::FromBrowserContext(contents->browser_context()); |
1338 profile->GetChromeURLDataManager()->AddDataSource(html_source); | 1344 profile->GetChromeURLDataManager()->AddDataSource(html_source); |
1339 } | 1345 } |
OLD | NEW |