blob: 2e4a76085c209722a3e779fe10b281452b312099 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
// Copyright (c) 2010 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_DOM_UI_OPTIONS_ABOUT_PAGE_HANDLER_H_
#define CHROME_BROWSER_DOM_UI_OPTIONS_ABOUT_PAGE_HANDLER_H_
#include <string>
#include "chrome/browser/dom_ui/options/options_ui.h"
#if defined(OS_CHROMEOS)
#include "chrome/browser/chromeos/cros/update_library.h"
#include "chrome/browser/chromeos/version_loader.h"
#endif
// ChromeOS about page UI handler.
class AboutPageHandler : public OptionsPageUIHandler {
public:
AboutPageHandler();
virtual ~AboutPageHandler();
// OptionsUIHandler implementation.
virtual void GetLocalizedValues(DictionaryValue* localized_strings);
virtual void RegisterMessages();
private:
void PageReady(const ListValue* args);
#if defined(OS_CHROMEOS)
void CheckNow(const ListValue* args);
// Callback from chromeos::VersionLoader giving the version.
void OnOSVersion(chromeos::VersionLoader::Handle handle,
std::string version);
void UpdateStatus(const chromeos::UpdateLibrary::Status& status);
// Handles asynchronously loading the version.
chromeos::VersionLoader loader_;
// Used to request the version.
CancelableRequestConsumer consumer_;
// Update Observer
class UpdateObserver;
scoped_ptr<UpdateObserver> update_observer_;
int progress_;
bool sticky_;
bool started_;
#endif
DISALLOW_COPY_AND_ASSIGN(AboutPageHandler);
};
#endif // CHROME_BROWSER_DOM_UI_OPTIONS_ABOUT_PAGE_HANDLER_H_
|