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

Side by Side 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: more estade changes 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 unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_WEBUI_VERSION_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_VERSION_HANDLER_H_
7
8 #include "base/memory/weak_ptr.h"
9 #include "base/values.h"
10 #include "content/public/browser/web_ui_message_handler.h"
11 #include "webkit/plugins/webplugininfo.h"
12
13 #include <vector>
14
15 // Handler class for Version page operations.
16 class VersionHandler : public content::WebUIMessageHandler {
17 public:
18 VersionHandler();
19 virtual ~VersionHandler();
20
21 // content::WebUIMessageHandler implementation.
22 virtual void RegisterMessages() OVERRIDE;
23
24 // Callback for the "requestVersionInfo" message. This asynchronously requests
25 // the flash version and eventually returns it to the front end along with the
26 // list of variations using OnGotPlugins.
27 virtual void HandleRequestVersionInfo(const ListValue* args);
28
29 private:
30 // Callback which handles returning the executable and profile paths to the
31 // front end.
32 void OnGotFilePaths(std::string* executable_path_data,
33 std::string* profile_path_data);
34
35 // Callback for GetPlugins which responds to the page with the Flash version.
36 // This also initiates the OS Version load on ChromeOS.
37 void OnGotPlugins(const std::vector<webkit::WebPluginInfo>& plugins);
38
39 // Factory for the creating refs in callbacks.
40 base::WeakPtrFactory<VersionHandler> weak_ptr_factory_;
41
42 // Members used to pass the paths back to |OnGotFilePaths|.
43 std::string executable_path_;
44 std::string profile_path_;
45
46 DISALLOW_COPY_AND_ASSIGN(VersionHandler);
47 };
48
49 #endif // CHROME_BROWSER_UI_WEBUI_VERSION_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698