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

Side by Side Diff: chrome/browser/ui/webui/options2/chromeos/pointer_handler2.h

Issue 9693032: [uber page] Split up initialization of handlers from initialization of webui pages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copyright bumps Created 8 years, 9 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_OPTIONS2_CHROMEOS_POINTER_HANDLER2_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS2_CHROMEOS_POINTER_HANDLER2_H_
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS2_CHROMEOS_POINTER_HANDLER2_H_ 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS2_CHROMEOS_POINTER_HANDLER2_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
11 #include "chrome/browser/chromeos/device_hierarchy_observer.h" 11 #include "chrome/browser/chromeos/device_hierarchy_observer.h"
12 #include "chrome/browser/prefs/pref_member.h" 12 #include "chrome/browser/prefs/pref_member.h"
13 #include "chrome/browser/ui/webui/options2/options_ui2.h" 13 #include "chrome/browser/ui/webui/options2/options_ui2.h"
14 14
15 namespace chromeos { 15 namespace chromeos {
16 namespace options2 { 16 namespace options2 {
17 17
18 // Pointer settings overlay page UI handler. 18 // Pointer settings overlay page UI handler.
19 class PointerHandler : public OptionsPageUIHandler, 19 class PointerHandler : public OptionsPageUIHandler,
20 public chromeos::DeviceHierarchyObserver, 20 public chromeos::DeviceHierarchyObserver,
21 public base::SupportsWeakPtr<PointerHandler> { 21 public base::SupportsWeakPtr<PointerHandler> {
22 public: 22 public:
23 PointerHandler(); 23 PointerHandler();
24 virtual ~PointerHandler(); 24 virtual ~PointerHandler();
25 25
26 // OptionsPageUIHandler implementation. 26 // OptionsPageUIHandler implementation.
27 virtual void GetLocalizedValues(DictionaryValue* localized_strings) OVERRIDE; 27 virtual void GetLocalizedValues(DictionaryValue* localized_strings) OVERRIDE;
28 virtual void Initialize() OVERRIDE; 28 virtual void InitializeHandler() OVERRIDE;
29 virtual void InitializePage() OVERRIDE;
29 30
30 // DeviceHierarchyObserver implementation. 31 // DeviceHierarchyObserver implementation.
31 virtual void DeviceHierarchyChanged() OVERRIDE; 32 virtual void DeviceHierarchyChanged() OVERRIDE;
32 33
33 private: 34 private:
34 // Check for input devices. 35 // Check for input devices.
35 void CheckTouchpadExists(); 36 void CheckTouchpadExists();
36 void CheckMouseExists(); 37 void CheckMouseExists();
37 38
38 // Callback for input device checks. 39 // Callback for input device checks.
39 void TouchpadExists(bool* exists); 40 void TouchpadExists(bool* exists);
40 void MouseExists(bool* exists); 41 void MouseExists(bool* exists);
41 42
42 DISALLOW_COPY_AND_ASSIGN(PointerHandler); 43 DISALLOW_COPY_AND_ASSIGN(PointerHandler);
43 }; 44 };
44 45
45 } // namespace options2 46 } // namespace options2
46 } // namespace chromeos 47 } // namespace chromeos
47 48
48 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS2_CHROMEOS_POINTER_HANDLER2_H_ 49 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS2_CHROMEOS_POINTER_HANDLER2_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698