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

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

Issue 10916182: Refactor the about:version code out of about_ui. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: rebase + lei nit Created 8 years, 3 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/ui/webui/chrome_web_ui_data_source.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
===================================================================
--- chrome/browser/ui/webui/version_handler.h (revision 0)
+++ chrome/browser/ui/webui/version_handler.h (revision 0)
@@ -0,0 +1,45 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_WEBUI_VERSION_HANDLER_H_
+#define CHROME_BROWSER_UI_WEBUI_VERSION_HANDLER_H_
+
+#include <vector>
+
+#include "base/memory/weak_ptr.h"
+#include "base/values.h"
+#include "content/public/browser/web_ui_message_handler.h"
+#include "webkit/plugins/webplugininfo.h"
+
+// Handler class for Version page operations.
+class VersionHandler : public content::WebUIMessageHandler {
+ public:
+ VersionHandler();
+ virtual ~VersionHandler();
+
+ // content::WebUIMessageHandler implementation.
+ virtual 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 ListValue* args);
+
+ private:
+ // Callback which handles returning the executable and profile paths to the
+ // front end.
+ void OnGotFilePaths(string16* executable_path_data,
+ string16* profile_path_data);
+
+ // 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<webkit::WebPluginInfo>& plugins);
+
+ // Factory for the creating refs in callbacks.
+ base::WeakPtrFactory<VersionHandler> weak_ptr_factory_;
+
+ DISALLOW_COPY_AND_ASSIGN(VersionHandler);
+};
+
+#endif // CHROME_BROWSER_UI_WEBUI_VERSION_HANDLER_H_
Property changes on: chrome/browser/ui/webui/version_handler.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « chrome/browser/ui/webui/chrome_web_ui_data_source.cc ('k') | chrome/browser/ui/webui/version_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698