| OLD | NEW |
| 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 Loading... |
| 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(); |
| 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)); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 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 |
| OLD | NEW |