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

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: fix tests 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 "chrome/browser/ui/webui/help/version_updater.h" 12 #include "chrome/browser/ui/webui/help/version_updater.h"
13 #include "content/public/browser/notification_observer.h" 13 #include "content/public/browser/notification_observer.h"
14 #include "content/public/browser/notification_registrar.h" 14 #include "content/public/browser/notification_registrar.h"
15 #include "content/public/browser/web_ui_message_handler.h" 15 #include "content/public/browser/web_ui_message_handler.h"
16 16
17 #if defined(OS_CHROMEOS) 17 #if defined(OS_CHROMEOS)
18 #include "chrome/browser/chromeos/version_loader.h" 18 #include "chrome/browser/chromeos/version_loader.h"
19 #endif // defined(OS_CHROMEOS) 19 #endif // defined(OS_CHROMEOS)
20 20
21 namespace content {
22 class WebUIDataSource;
23 }
24
25 // WebUI message handler for the help page. 21 // WebUI message handler for the help page.
26 class HelpHandler : public content::WebUIMessageHandler, 22 class HelpHandler : public content::WebUIMessageHandler,
27 public content::NotificationObserver { 23 public content::NotificationObserver {
28 public: 24 public:
29 HelpHandler(); 25 HelpHandler();
30 virtual ~HelpHandler(); 26 virtual ~HelpHandler();
31 27
32 // WebUIMessageHandler implementation. 28 // WebUIMessageHandler implementation.
33 virtual void RegisterMessages() OVERRIDE; 29 virtual void RegisterMessages() OVERRIDE;
34 30
35 // Fills |source| with string values for the UI. 31 // Adds string values for the UI to |localized_strings|.
36 void GetLocalizedValues(content::WebUIDataSource* source); 32 static void GetLocalizedValues(base::DictionaryValue* localized_strings);
Dan Beam 2014/08/13 02:50:46 Y U NO FORWARD DECLARE DictionaryValue?
michaelpg 2014/08/13 08:12:11 let me know if this is overboard or correct
37 33
38 // NotificationObserver implementation. 34 // NotificationObserver implementation.
39 virtual void Observe(int type, const content::NotificationSource& source, 35 virtual void Observe(int type, const content::NotificationSource& source,
40 const content::NotificationDetails& details) OVERRIDE; 36 const content::NotificationDetails& details) OVERRIDE;
41 37
42 private: 38 private:
43 // Initializes querying values for the page. 39 // Initializes querying values for the page.
44 void OnPageLoaded(const base::ListValue* args); 40 void OnPageLoaded(const base::ListValue* args);
45 41
46 #if defined(OS_MACOSX) 42 #if defined(OS_MACOSX)
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 base::CancelableTaskTracker tracker_; 92 base::CancelableTaskTracker tracker_;
97 #endif // defined(OS_CHROMEOS) 93 #endif // defined(OS_CHROMEOS)
98 94
99 // Used for callbacks. 95 // Used for callbacks.
100 base::WeakPtrFactory<HelpHandler> weak_factory_; 96 base::WeakPtrFactory<HelpHandler> weak_factory_;
101 97
102 DISALLOW_COPY_AND_ASSIGN(HelpHandler); 98 DISALLOW_COPY_AND_ASSIGN(HelpHandler);
103 }; 99 };
104 100
105 #endif // CHROME_BROWSER_UI_WEBUI_HELP_HELP_HANDLER_H_ 101 #endif // CHROME_BROWSER_UI_WEBUI_HELP_HELP_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698