| 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 #ifndef IOS_CHROME_BROWSER_UI_WEBUI_VERSION_UI_H_ | 5 #ifndef IOS_CHROME_BROWSER_UI_WEBUI_VERSION_UI_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_WEBUI_VERSION_UI_H_ | 6 #define IOS_CHROME_BROWSER_UI_WEBUI_VERSION_UI_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "ios/web/public/webui/web_ui_ios_controller.h" | 11 #include "components/version_ui/version.mojom.h" |
| 12 #import "ios/chrome/browser/ui/webui/mojo_web_ui_ios_controller.h" |
| 13 |
| 14 class VersionHandler; |
| 12 | 15 |
| 13 // The WebUI handler for chrome://version. | 16 // The WebUI handler for chrome://version. |
| 14 class VersionUI : public web::WebUIIOSController { | 17 class VersionUI : public MojoWebUIIOSController<mojom::VersionPageHandler> { |
| 15 public: | 18 public: |
| 16 explicit VersionUI(web::WebUIIOS* web_ui); | 19 explicit VersionUI(web::WebUIIOS* web_ui); |
| 17 ~VersionUI() override; | 20 ~VersionUI() override; |
| 18 | 21 |
| 19 private: | 22 private: |
| 23 // MojoWebUIIOSController overrides: |
| 24 void BindUIHandler( |
| 25 mojo::InterfaceRequest<mojom::VersionPageHandler> request) override; |
| 26 |
| 27 std::unique_ptr<VersionHandler> version_handler_; |
| 28 |
| 20 DISALLOW_COPY_AND_ASSIGN(VersionUI); | 29 DISALLOW_COPY_AND_ASSIGN(VersionUI); |
| 21 }; | 30 }; |
| 22 | 31 |
| 23 #endif // IOS_CHROME_BROWSER_UI_WEBUI_VERSION_UI_H_ | 32 #endif // IOS_CHROME_BROWSER_UI_WEBUI_VERSION_UI_H_ |
| OLD | NEW |