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

Side by Side Diff: chrome/browser/ui/webui/about_page/about_page_handler.h

Issue 9320056: Help: Implement the initial version of the cross-platform help/about page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: String fix. Created 8 years, 10 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
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_ABOUT_PAGE_ABOUT_PAGE_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_ABOUT_PAGE_ABOUT_PAGE_HANDLER_H_
7
8 #include <string>
9
10 #include "base/compiler_specific.h"
11 #include "chrome/browser/chromeos/dbus/update_engine_client.h"
12 #include "chrome/browser/chromeos/version_loader.h"
13 #include "content/public/browser/web_ui_message_handler.h"
14
15 // ChromeOS about page UI handler.
16 class AboutPageHandler : public content::WebUIMessageHandler {
17 public:
18 AboutPageHandler();
19 virtual ~AboutPageHandler();
20
21 // WebUIMessageHandler implementation.
22 virtual void RegisterMessages() OVERRIDE;
23
24 // Fills |localized_strings| with string values for the UI.
25 void GetLocalizedValues(base::DictionaryValue* localized_strings);
26
27 private:
28 class UpdateObserver;
29
30 // The function is called from JavaScript when the about page is ready.
31 void PageReady(const base::ListValue* args);
32
33 // The function is called from JavaScript to set the release track like
34 // "beta-channel" and "dev-channel".
35 void SetReleaseTrack(const base::ListValue* args);
36
37 // Initiates update check.
38 void CheckNow(const base::ListValue* args);
39
40 // Restarts the system.
41 void RestartNow(const base::ListValue* args);
42
43 // Callback from VersionLoader giving the version.
44 void OnOSVersion(chromeos::VersionLoader::Handle handle,
45 std::string version);
46 void OnOSFirmware(chromeos::VersionLoader::Handle handle,
47 std::string firmware);
48 void UpdateStatus(const chromeos::UpdateEngineClient::Status& status);
49
50 // UpdateEngine Callback handler.
51 static void UpdateSelectedChannel(UpdateObserver* observer,
52 const std::string& channel);
53
54 // Handles asynchronously loading the version.
55 chromeos::VersionLoader loader_;
56
57 // Used to request the version.
58 CancelableRequestConsumer consumer_;
59
60 // Update Observer
61 scoped_ptr<UpdateObserver> update_observer_;
62
63 int progress_;
64 bool sticky_;
65 bool started_;
66
67 DISALLOW_COPY_AND_ASSIGN(AboutPageHandler);
68 };
69
70 #endif // CHROME_BROWSER_UI_WEBUI_ABOUT_PAGE_ABOUT_PAGE_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698