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

Side by Side Diff: chrome/browser/ui/webui/help/help_handler.h

Issue 10038034: Implemented a "Last Updated" field for the about page of Chrome OS. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Moved #include out of #if defined(OS_CHROMEOS) Created 8 years, 8 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
« no previous file with comments | « chrome/browser/resources/help/help.js ('k') | chrome/browser/ui/webui/help/help_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_WEBUI_HELP_HELP_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_HELP_HELP_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_HELP_HELP_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_HELP_HELP_HANDLER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/memory/weak_ptr.h"
11 #include "chrome/browser/ui/webui/help/version_updater.h" 12 #include "chrome/browser/ui/webui/help/version_updater.h"
12 #include "content/public/browser/notification_observer.h" 13 #include "content/public/browser/notification_observer.h"
13 #include "content/public/browser/notification_registrar.h" 14 #include "content/public/browser/notification_registrar.h"
14 #include "content/public/browser/web_ui_message_handler.h" 15 #include "content/public/browser/web_ui_message_handler.h"
15 16
16 #if defined(OS_CHROMEOS) 17 #if defined(OS_CHROMEOS)
18 #include "base/platform_file.h"
17 #include "chrome/browser/chromeos/version_loader.h" 19 #include "chrome/browser/chromeos/version_loader.h"
18 #endif // defined(OS_CHROMEOS) 20 #endif // defined(OS_CHROMEOS)
19 21
20 // WebUI message handler for the help page. 22 // WebUI message handler for the help page.
21 class HelpHandler : public content::WebUIMessageHandler, 23 class HelpHandler : public content::WebUIMessageHandler,
22 public content::NotificationObserver { 24 public content::NotificationObserver {
23 public: 25 public:
24 HelpHandler(); 26 HelpHandler();
25 virtual ~HelpHandler(); 27 virtual ~HelpHandler();
26 28
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 // Callback method which forwards promotion state to the page. 67 // Callback method which forwards promotion state to the page.
66 void SetPromotionState(VersionUpdater::PromotionState state); 68 void SetPromotionState(VersionUpdater::PromotionState state);
67 #endif 69 #endif
68 70
69 #if defined(OS_CHROMEOS) 71 #if defined(OS_CHROMEOS)
70 // Callbacks from VersionLoader. 72 // Callbacks from VersionLoader.
71 void OnOSVersion(chromeos::VersionLoader::Handle handle, std::string version); 73 void OnOSVersion(chromeos::VersionLoader::Handle handle, std::string version);
72 void OnOSFirmware(chromeos::VersionLoader::Handle handle, 74 void OnOSFirmware(chromeos::VersionLoader::Handle handle,
73 std::string firmware); 75 std::string firmware);
74 void OnReleaseChannel(const std::string& channel); 76 void OnReleaseChannel(const std::string& channel);
77
78 void ProcessLsbFileInfo(
79 base::PlatformFileError rv, const base::PlatformFileInfo& file_info);
75 #endif 80 #endif
76 81
77 // Specialized instance of the VersionUpdater used to update the browser. 82 // Specialized instance of the VersionUpdater used to update the browser.
78 scoped_ptr<VersionUpdater> version_updater_; 83 scoped_ptr<VersionUpdater> version_updater_;
79 84
85 // Used for callbacks.
86 base::WeakPtrFactory<HelpHandler> weak_factory_;
87
80 // Used to observe notifications. 88 // Used to observe notifications.
81 content::NotificationRegistrar registrar_; 89 content::NotificationRegistrar registrar_;
82 90
83 #if defined(OS_CHROMEOS) 91 #if defined(OS_CHROMEOS)
84 // Handles asynchronously loading the CrOS version info. 92 // Handles asynchronously loading the CrOS version info.
85 chromeos::VersionLoader loader_; 93 chromeos::VersionLoader loader_;
86 94
87 // Used to request the version. 95 // Used to request the version.
88 CancelableRequestConsumer consumer_; 96 CancelableRequestConsumer consumer_;
89 #endif // defined(OS_CHROMEOS) 97 #endif // defined(OS_CHROMEOS)
90 98
91 DISALLOW_COPY_AND_ASSIGN(HelpHandler); 99 DISALLOW_COPY_AND_ASSIGN(HelpHandler);
92 }; 100 };
93 101
94 #endif // CHROME_BROWSER_UI_WEBUI_HELP_HELP_HANDLER_H_ 102 #endif // CHROME_BROWSER_UI_WEBUI_HELP_HELP_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/resources/help/help.js ('k') | chrome/browser/ui/webui/help/help_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698