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

Unified Diff: ios/chrome/browser/ui/webui/version_ui.mm

Issue 2041603002: [ios Mojo] Implemented chrome://version. Base URL: https://chromium.googlesource.com/chromium/src.git@mojo_version
Patch Set: Self review Created 4 years, 5 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 | « ios/chrome/browser/ui/webui/version_ui.h ('k') | ios/chrome/ios_chrome.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/webui/version_ui.mm
diff --git a/ios/chrome/browser/ui/webui/version_ui.mm b/ios/chrome/browser/ui/webui/version_ui.mm
index d0349538488924003fd958421c075b2e9b8c4669..f4d28e2109a31baefe59f75848d3e5eff2f3b636 100644
--- a/ios/chrome/browser/ui/webui/version_ui.mm
+++ b/ios/chrome/browser/ui/webui/version_ui.mm
@@ -23,8 +23,8 @@
#include "ios/chrome/grit/ios_google_chrome_strings.h"
#include "ios/chrome/grit/ios_strings.h"
#include "ios/web/public/web_client.h"
+#import "ios/web/public/web_state/web_state.h"
#include "ios/web/public/web_ui_ios_data_source.h"
-#include "ios/web/public/webui/web_ui_ios.h"
#include "ui/base/l10n/l10n_util.h"
namespace {
@@ -95,19 +95,25 @@ web::WebUIIOSDataSource* CreateVersionUIDataSource() {
IDS_VERSION_UI_VARIATIONS);
html_source->SetJsonPath("strings.js");
- html_source->AddResourcePath(version_ui::kVersionJS, IDR_VERSION_UI_IOS_JS);
+ html_source->AddResourcePath(version_ui::kVersionJS, IDR_VERSION_UI_JS);
html_source->AddResourcePath(version_ui::kAboutVersionCSS,
IDR_VERSION_UI_CSS);
+ html_source->AddResourcePath("components/version_ui/version.mojom",
+ IDR_VERSION_MOJO_JS);
html_source->SetDefaultResource(IDR_VERSION_UI_HTML);
return html_source;
}
} // namespace
-VersionUI::VersionUI(web::WebUIIOS* web_ui) : web::WebUIIOSController(web_ui) {
- web_ui->AddMessageHandler(new VersionHandler());
+VersionUI::VersionUI(web::WebUIIOS* web_ui) : MojoWebUIIOSController(web_ui) {
web::WebUIIOSDataSource::Add(ios::ChromeBrowserState::FromWebUIIOS(web_ui),
CreateVersionUIDataSource());
}
VersionUI::~VersionUI() {}
+
+void VersionUI::BindUIHandler(
+ mojo::InterfaceRequest<mojom::VersionPageHandler> request) {
+ version_handler_.reset(new VersionHandler(std::move(request)));
+}
« no previous file with comments | « ios/chrome/browser/ui/webui/version_ui.h ('k') | ios/chrome/ios_chrome.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698