| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "ios/chrome/browser/ui/webui/version_ui.h" | 5 #include "ios/chrome/browser/ui/webui/version_ui.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| 11 #include "components/version_info/version_info.h" | 11 #include "components/version_info/version_info.h" |
| 12 #include "components/version_ui/version_ui_constants.h" | 12 #include "components/version_ui/version_ui_constants.h" |
| 13 #include "grit/components_chromium_strings.h" | 13 #include "grit/components_chromium_strings.h" |
| 14 #include "grit/components_google_chrome_strings.h" | 14 #include "grit/components_google_chrome_strings.h" |
| 15 #include "grit/components_resources.h" | 15 #include "grit/components_resources.h" |
| 16 #include "grit/components_strings.h" | 16 #include "grit/components_strings.h" |
| 17 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" |
| 17 #include "ios/chrome/browser/chrome_url_constants.h" | 18 #include "ios/chrome/browser/chrome_url_constants.h" |
| 18 #include "ios/chrome/browser/ui/ui_util.h" | 19 #include "ios/chrome/browser/ui/ui_util.h" |
| 19 #include "ios/chrome/browser/ui/webui/version_handler.h" | 20 #include "ios/chrome/browser/ui/webui/version_handler.h" |
| 20 #include "ios/chrome/common/channel_info.h" | 21 #include "ios/chrome/common/channel_info.h" |
| 21 #include "ios/chrome/grit/ios_chromium_strings.h" | 22 #include "ios/chrome/grit/ios_chromium_strings.h" |
| 22 #include "ios/chrome/grit/ios_google_chrome_strings.h" | 23 #include "ios/chrome/grit/ios_google_chrome_strings.h" |
| 23 #include "ios/chrome/grit/ios_strings.h" | 24 #include "ios/chrome/grit/ios_strings.h" |
| 24 #include "ios/public/provider/chrome/browser/browser_state/chrome_browser_state.
h" | |
| 25 #include "ios/public/provider/web/web_ui_ios.h" | 25 #include "ios/public/provider/web/web_ui_ios.h" |
| 26 #include "ios/web/public/web_client.h" | 26 #include "ios/web/public/web_client.h" |
| 27 #include "ios/web/public/web_ui_ios_data_source.h" | 27 #include "ios/web/public/web_ui_ios_data_source.h" |
| 28 #include "ui/base/l10n/l10n_util.h" | 28 #include "ui/base/l10n/l10n_util.h" |
| 29 | 29 |
| 30 namespace { | 30 namespace { |
| 31 | 31 |
| 32 web::WebUIIOSDataSource* CreateVersionUIDataSource() { | 32 web::WebUIIOSDataSource* CreateVersionUIDataSource() { |
| 33 web::WebUIIOSDataSource* html_source = | 33 web::WebUIIOSDataSource* html_source = |
| 34 web::WebUIIOSDataSource::Create(kChromeUIVersionHost); | 34 web::WebUIIOSDataSource::Create(kChromeUIVersionHost); |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 | 104 |
| 105 } // namespace | 105 } // namespace |
| 106 | 106 |
| 107 VersionUI::VersionUI(web::WebUIIOS* web_ui) : web::WebUIIOSController(web_ui) { | 107 VersionUI::VersionUI(web::WebUIIOS* web_ui) : web::WebUIIOSController(web_ui) { |
| 108 web_ui->AddMessageHandler(new VersionHandler()); | 108 web_ui->AddMessageHandler(new VersionHandler()); |
| 109 web::WebUIIOSDataSource::Add(ios::ChromeBrowserState::FromWebUIIOS(web_ui), | 109 web::WebUIIOSDataSource::Add(ios::ChromeBrowserState::FromWebUIIOS(web_ui), |
| 110 CreateVersionUIDataSource()); | 110 CreateVersionUIDataSource()); |
| 111 } | 111 } |
| 112 | 112 |
| 113 VersionUI::~VersionUI() {} | 113 VersionUI::~VersionUI() {} |
| OLD | NEW |