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

Unified Diff: chrome/browser/ui/webui/version_handler.h

Issue 1486403002: Mojo-ifying chrome://version. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change slashes 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 | « chrome/browser/extensions/active_tab_unittest.cc ('k') | chrome/browser/ui/webui/version_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/version_handler.h
diff --git a/chrome/browser/ui/webui/version_handler.h b/chrome/browser/ui/webui/version_handler.h
index d121739f25c589335cbe79cec27ae6cee04f603e..908983861ea3f5e73b02d1349ed7ee3756b74188 100644
--- a/chrome/browser/ui/webui/version_handler.h
+++ b/chrome/browser/ui/webui/version_handler.h
@@ -10,32 +10,48 @@
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/values.h"
-#include "content/public/browser/web_ui_message_handler.h"
+#include "chrome/browser/ui/webui/mojo_web_ui_handler.h"
+#include "components/version_ui/version.mojom.h"
+#include "content/public/browser/web_ui.h"
#include "content/public/common/webplugininfo.h"
+#include "mojo/public/cpp/bindings/binding.h"
// Handler class for Version page operations.
-class VersionHandler : public content::WebUIMessageHandler {
+class VersionHandler : public MojoWebUIHandler,
+ public mojom::VersionPageHandler {
public:
- VersionHandler();
+ VersionHandler(content::WebUI* web_ui,
+ mojo::InterfaceRequest<VersionPageHandler> request);
~VersionHandler() override;
- // content::WebUIMessageHandler implementation.
- void RegisterMessages() override;
-
- // Callback for the "requestVersionInfo" message. This asynchronously requests
- // the flash version and eventually returns it to the front end along with the
- // list of variations using OnGotPlugins.
- virtual void HandleRequestVersionInfo(const base::ListValue* args);
+ // mojom::VersionPageHandler overrides:
+ void GetFilePaths(const GetFilePathsCallback& callback) override;
+ void GetFlashVersion(const GetFlashVersionCallback& callback) override;
+ void GetVariations(const GetVariationsCallback& callback) override;
+ void GetOsVersion(const GetOsVersionCallback& callback) override;
+ void GetArcVersion(const GetArcVersionCallback& callback) override;
private:
// Callback which handles returning the executable and profile paths to the
// front end.
void OnGotFilePaths(base::string16* executable_path_data,
- base::string16* profile_path_data);
+ base::string16* profile_path_data,
+ const GetFilePathsCallback& callback);
+#if defined(ENABLE_PLUGINS)
// Callback for GetPlugins which responds to the page with the Flash version.
- // This also initiates the OS Version load on ChromeOS.
- void OnGotPlugins(const std::vector<content::WebPluginInfo>& plugins);
+ void OnGotPlugins(const GetFlashVersionCallback& callback,
+ const std::vector<content::WebPluginInfo>& plugins);
+#endif // defined(ENABLE_PLUGINS)
+#if defined(OS_CHROMEOS)
+ void OnGotOsVersion(const GetOsVersionCallback& callback,
+ const std::string& version);
+ void OnGotArcVersion(const GetOsVersionCallback& callback,
+ const std::string& version);
+#endif // defined(OS_CHROMEOS)
+
+ content::WebUI* web_ui_;
+ mojo::Binding<mojom::VersionPageHandler> binding_;
// Factory for the creating refs in callbacks.
base::WeakPtrFactory<VersionHandler> weak_ptr_factory_;
« no previous file with comments | « chrome/browser/extensions/active_tab_unittest.cc ('k') | chrome/browser/ui/webui/version_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698