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

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

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: code shuffling 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 #include "chrome/browser/ui/webui/options2/chromeos/pointer_handler2.h" 5 #include "chrome/browser/ui/webui/options2/chromeos/pointer_handler2.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/chromeos/system/input_device_settings.h" 10 #include "chrome/browser/chromeos/system/input_device_settings.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 IDS_OPTIONS_POINTER_OVERLAY_SECTION_TITLE_MOUSE }, 49 IDS_OPTIONS_POINTER_OVERLAY_SECTION_TITLE_MOUSE },
50 { "enableTapToClick", 50 { "enableTapToClick",
51 IDS_OPTIONS_SETTINGS_TAP_TO_CLICK_ENABLED_DESCRIPTION }, 51 IDS_OPTIONS_SETTINGS_TAP_TO_CLICK_ENABLED_DESCRIPTION },
52 { "primaryMouseRight", 52 { "primaryMouseRight",
53 IDS_OPTIONS_SETTINGS_PRIMARY_MOUSE_RIGHT_DESCRIPTION }, 53 IDS_OPTIONS_SETTINGS_PRIMARY_MOUSE_RIGHT_DESCRIPTION },
54 }; 54 };
55 55
56 RegisterStrings(localized_strings, resources, arraysize(resources)); 56 RegisterStrings(localized_strings, resources, arraysize(resources));
57 } 57 }
58 58
59 void PointerHandler::Initialize() { 59 void PointerHandler::InitializeHandler() {
60 chromeos::XInputHierarchyChangedEventListener::GetInstance() 60 chromeos::XInputHierarchyChangedEventListener::GetInstance()
61 ->AddObserver(this); 61 ->AddObserver(this);
62 DeviceHierarchyChanged(); 62 DeviceHierarchyChanged();
csilv 2012/03/14 00:09:11 this line should ve moved to InitializePage()
Dan Beam 2012/03/14 01:13:14 Done.
63 } 63 }
64 64
65 void PointerHandler::CheckTouchpadExists() { 65 void PointerHandler::CheckTouchpadExists() {
66 bool* exists = new bool; 66 bool* exists = new bool;
67 BrowserThread::PostTaskAndReply(BrowserThread::FILE, FROM_HERE, 67 BrowserThread::PostTaskAndReply(BrowserThread::FILE, FROM_HERE,
68 base::Bind(&TouchpadExistsFileThread, exists), 68 base::Bind(&TouchpadExistsFileThread, exists),
69 base::Bind(&PointerHandler::TouchpadExists, AsWeakPtr(), exists)); 69 base::Bind(&PointerHandler::TouchpadExists, AsWeakPtr(), exists));
70 } 70 }
71 71
72 void PointerHandler::CheckMouseExists() { 72 void PointerHandler::CheckMouseExists() {
(...skipping 15 matching lines...) Expand all
88 delete exists; 88 delete exists;
89 } 89 }
90 90
91 void PointerHandler::DeviceHierarchyChanged() { 91 void PointerHandler::DeviceHierarchyChanged() {
92 CheckMouseExists(); 92 CheckMouseExists();
93 CheckTouchpadExists(); 93 CheckTouchpadExists();
94 } 94 }
95 95
96 } // namespace options2 96 } // namespace options2
97 } // namespace chromeos 97 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698