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

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

Issue 449623003: Integrate About page into Settings for Chrome OS settings in a window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: simplify Created 6 years, 4 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
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 "base/memory/weak_ptr.h"
12 #include "base/strings/string16.h"
12 #include "chrome/browser/ui/webui/help/version_updater.h" 13 #include "chrome/browser/ui/webui/help/version_updater.h"
13 #include "content/public/browser/notification_observer.h" 14 #include "content/public/browser/notification_observer.h"
14 #include "content/public/browser/notification_registrar.h" 15 #include "content/public/browser/notification_registrar.h"
15 #include "content/public/browser/web_ui_message_handler.h" 16 #include "content/public/browser/web_ui_message_handler.h"
16 17
17 #if defined(OS_CHROMEOS) 18 #if defined(OS_CHROMEOS)
19 #include "base/task/cancelable_task_tracker.h"
18 #include "chrome/browser/chromeos/version_loader.h" 20 #include "chrome/browser/chromeos/version_loader.h"
19 #endif // defined(OS_CHROMEOS) 21 #endif // defined(OS_CHROMEOS)
20 22
23 namespace base {
24 class DictionaryValue;
25 class ListValue;
26 }
27
21 namespace content { 28 namespace content {
22 class WebUIDataSource; 29 class NotificationDetails;
30 class NotificationSource;
23 } 31 }
Dan Beam 2014/08/13 17:03:18 don't forward OVERRIDE methods
michaelpg 2014/08/13 20:17:51 Done.
24 32
25 // WebUI message handler for the help page. 33 // WebUI message handler for the help page.
26 class HelpHandler : public content::WebUIMessageHandler, 34 class HelpHandler : public content::WebUIMessageHandler,
27 public content::NotificationObserver { 35 public content::NotificationObserver {
28 public: 36 public:
29 HelpHandler(); 37 HelpHandler();
30 virtual ~HelpHandler(); 38 virtual ~HelpHandler();
31 39
32 // WebUIMessageHandler implementation. 40 // WebUIMessageHandler implementation.
33 virtual void RegisterMessages() OVERRIDE; 41 virtual void RegisterMessages() OVERRIDE;
34 42
35 // Fills |source| with string values for the UI. 43 // Adds string values for the UI to |localized_strings|.
36 void GetLocalizedValues(content::WebUIDataSource* source); 44 static void GetLocalizedValues(base::DictionaryValue* localized_strings);
37 45
38 // NotificationObserver implementation. 46 // NotificationObserver implementation.
39 virtual void Observe(int type, const content::NotificationSource& source, 47 virtual void Observe(int type, const content::NotificationSource& source,
40 const content::NotificationDetails& details) OVERRIDE; 48 const content::NotificationDetails& details) OVERRIDE;
41 49
42 private: 50 private:
43 // Initializes querying values for the page. 51 // Initializes querying values for the page.
44 void OnPageLoaded(const base::ListValue* args); 52 void OnPageLoaded(const base::ListValue* args);
45 53
46 #if defined(OS_MACOSX) 54 #if defined(OS_MACOSX)
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 base::CancelableTaskTracker tracker_; 104 base::CancelableTaskTracker tracker_;
97 #endif // defined(OS_CHROMEOS) 105 #endif // defined(OS_CHROMEOS)
98 106
99 // Used for callbacks. 107 // Used for callbacks.
100 base::WeakPtrFactory<HelpHandler> weak_factory_; 108 base::WeakPtrFactory<HelpHandler> weak_factory_;
101 109
102 DISALLOW_COPY_AND_ASSIGN(HelpHandler); 110 DISALLOW_COPY_AND_ASSIGN(HelpHandler);
103 }; 111 };
104 112
105 #endif // CHROME_BROWSER_UI_WEBUI_HELP_HELP_HANDLER_H_ 113 #endif // CHROME_BROWSER_UI_WEBUI_HELP_HELP_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698