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

Side by Side Diff: ios/chrome/browser/ui/webui/version_ui.cc

Issue 1486403002: Mojo-ifying chrome://version. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing comments Created 5 years 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
OLDNEW
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 "components/version_info/version_info.h" 10 #include "components/version_info/version_info.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 for (ArgvList::const_iterator iter = argv.begin(); iter != argv.end(); iter++) 87 for (ArgvList::const_iterator iter = argv.begin(); iter != argv.end(); iter++)
88 command_line += " " + *iter; 88 command_line += " " + *iter;
89 // TODO(viettrungluu): |command_line| could really have any encoding, whereas 89 // TODO(viettrungluu): |command_line| could really have any encoding, whereas
90 // below we assumes it's UTF-8. 90 // below we assumes it's UTF-8.
91 html_source->AddString(version_ui::kCommandLine, command_line); 91 html_source->AddString(version_ui::kCommandLine, command_line);
92 92
93 html_source->AddLocalizedString(version_ui::kVariationsName, 93 html_source->AddLocalizedString(version_ui::kVariationsName,
94 IDS_VERSION_UI_VARIATIONS); 94 IDS_VERSION_UI_VARIATIONS);
95 95
96 html_source->SetJsonPath("strings.js"); 96 html_source->SetJsonPath("strings.js");
97 html_source->AddResourcePath(version_ui::kVersionJS, IDR_VERSION_UI_JS); 97 html_source->AddResourcePath(version_ui::kVersionJS, IDR_VERSION_UI_IOS_JS);
98 html_source->AddResourcePath(version_ui::kAboutVersionCSS, 98 html_source->AddResourcePath(version_ui::kAboutVersionCSS,
99 IDR_VERSION_UI_CSS); 99 IDR_VERSION_UI_CSS);
100 html_source->SetDefaultResource(IDR_VERSION_UI_HTML); 100 html_source->SetDefaultResource(IDR_VERSION_UI_HTML);
101 return html_source; 101 return html_source;
102 } 102 }
103 103
104 } // namespace 104 } // namespace
105 105
106 VersionUI::VersionUI(web::WebUIIOS* web_ui) : web::WebUIIOSController(web_ui) { 106 VersionUI::VersionUI(web::WebUIIOS* web_ui) : web::WebUIIOSController(web_ui) {
107 web_ui->AddMessageHandler(new VersionHandler()); 107 web_ui->AddMessageHandler(new VersionHandler());
108 web::WebUIIOSDataSource::Add(ios::ChromeBrowserState::FromWebUIIOS(web_ui), 108 web::WebUIIOSDataSource::Add(ios::ChromeBrowserState::FromWebUIIOS(web_ui),
109 CreateVersionUIDataSource()); 109 CreateVersionUIDataSource());
110 } 110 }
111 111
112 VersionUI::~VersionUI() {} 112 VersionUI::~VersionUI() {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698