| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/set_time_ui.h" | 5 #include "chrome/browser/ui/webui/chromeos/set_time_ui.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/system/tray/system_tray_delegate.h" | 8 #include "ash/system/tray/system_tray_delegate.h" |
| 9 #include "ash/system/user/login_status.h" | 9 #include "ash/system/user/login_status.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 }; | 100 }; |
| 101 | 101 |
| 102 } // namespace | 102 } // namespace |
| 103 | 103 |
| 104 SetTimeUI::SetTimeUI(content::WebUI* web_ui) : WebDialogUI(web_ui) { | 104 SetTimeUI::SetTimeUI(content::WebUI* web_ui) : WebDialogUI(web_ui) { |
| 105 web_ui->AddMessageHandler(new SetTimeMessageHandler()); | 105 web_ui->AddMessageHandler(new SetTimeMessageHandler()); |
| 106 | 106 |
| 107 // Set up the chrome://set-time source. | 107 // Set up the chrome://set-time source. |
| 108 content::WebUIDataSource* source = | 108 content::WebUIDataSource* source = |
| 109 content::WebUIDataSource::Create(chrome::kChromeUISetTimeHost); | 109 content::WebUIDataSource::Create(chrome::kChromeUISetTimeHost); |
| 110 source->SetUseJsonJSFormatV2(); | |
| 111 | 110 |
| 112 source->AddLocalizedString("setTimeTitle", IDS_SET_TIME_TITLE); | 111 source->AddLocalizedString("setTimeTitle", IDS_SET_TIME_TITLE); |
| 113 source->AddLocalizedString("prompt", IDS_SET_TIME_PROMPT); | 112 source->AddLocalizedString("prompt", IDS_SET_TIME_PROMPT); |
| 114 source->AddLocalizedString("doneButton", IDS_SET_TIME_BUTTON_CLOSE); | 113 source->AddLocalizedString("doneButton", IDS_SET_TIME_BUTTON_CLOSE); |
| 115 source->AddLocalizedString("timezone", | 114 source->AddLocalizedString("timezone", |
| 116 IDS_OPTIONS_SETTINGS_TIMEZONE_DESCRIPTION); | 115 IDS_OPTIONS_SETTINGS_TIMEZONE_DESCRIPTION); |
| 117 source->AddLocalizedString("dateLabel", IDS_SET_TIME_DATE_LABEL); | 116 source->AddLocalizedString("dateLabel", IDS_SET_TIME_DATE_LABEL); |
| 118 source->AddLocalizedString("timeLabel", IDS_SET_TIME_TIME_LABEL); | 117 source->AddLocalizedString("timeLabel", IDS_SET_TIME_TIME_LABEL); |
| 119 | 118 |
| 120 base::DictionaryValue values; | 119 base::DictionaryValue values; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 137 source->AddResourcePath("set_time.js", IDR_SET_TIME_JS); | 136 source->AddResourcePath("set_time.js", IDR_SET_TIME_JS); |
| 138 source->SetDefaultResource(IDR_SET_TIME_HTML); | 137 source->SetDefaultResource(IDR_SET_TIME_HTML); |
| 139 | 138 |
| 140 content::WebUIDataSource::Add(Profile::FromWebUI(web_ui), source); | 139 content::WebUIDataSource::Add(Profile::FromWebUI(web_ui), source); |
| 141 } | 140 } |
| 142 | 141 |
| 143 SetTimeUI::~SetTimeUI() { | 142 SetTimeUI::~SetTimeUI() { |
| 144 } | 143 } |
| 145 | 144 |
| 146 } // namespace chromeos | 145 } // namespace chromeos |
| OLD | NEW |