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

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

Issue 2116673002: [ios] Moved WebUI provider code to ios/web. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 unified diff | Download patch
« no previous file with comments | « ios/chrome/browser/ui/webui/version_handler.h ('k') | ios/chrome/browser/ui/webui/version_ui.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_handler.h" 5 #include "ios/chrome/browser/ui/webui/version_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "components/version_ui/version_handler_helper.h" 10 #include "components/version_ui/version_handler_helper.h"
11 #include "components/version_ui/version_ui_constants.h" 11 #include "components/version_ui/version_ui_constants.h"
12 #include "ios/public/provider/web/web_ui_ios.h" 12 #include "ios/web/public/webui/web_ui_ios.h"
13 #include "ui/base/l10n/l10n_util.h" 13 #include "ui/base/l10n/l10n_util.h"
14 14
15 VersionHandler::VersionHandler() {} 15 VersionHandler::VersionHandler() {}
16 16
17 VersionHandler::~VersionHandler() {} 17 VersionHandler::~VersionHandler() {}
18 18
19 void VersionHandler::RegisterMessages() { 19 void VersionHandler::RegisterMessages() {
20 web_ui()->RegisterMessageCallback( 20 web_ui()->RegisterMessageCallback(
21 version_ui::kRequestVersionInfo, 21 version_ui::kRequestVersionInfo,
22 base::Bind(&VersionHandler::HandleRequestVersionInfo, 22 base::Bind(&VersionHandler::HandleRequestVersionInfo,
23 base::Unretained(this))); 23 base::Unretained(this)));
24 } 24 }
25 25
26 void VersionHandler::HandleRequestVersionInfo(const base::ListValue* args) { 26 void VersionHandler::HandleRequestVersionInfo(const base::ListValue* args) {
27 // Respond with the variations info immediately. 27 // Respond with the variations info immediately.
28 web_ui()->CallJavascriptFunction(version_ui::kReturnVariationInfo, 28 web_ui()->CallJavascriptFunction(version_ui::kReturnVariationInfo,
29 *version_ui::GetVariationsList()); 29 *version_ui::GetVariationsList());
30 } 30 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/webui/version_handler.h ('k') | ios/chrome/browser/ui/webui/version_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698