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

Side by Side Diff: chrome/browser/chromeos/system/pointer_device_observer.cc

Issue 226413008: chromeos: Exclude browser/chromeos/events/ under ozone (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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/chromeos/system/pointer_device_observer.h" 5 #include "chrome/browser/chromeos/system/pointer_device_observer.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/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "chrome/browser/chromeos/events/xinput_hierarchy_changed_event_listener .h"
11 #include "chrome/browser/chromeos/system/input_device_settings.h" 10 #include "chrome/browser/chromeos/system/input_device_settings.h"
12 #include "content/public/browser/browser_thread.h" 11 #include "content/public/browser/browser_thread.h"
13 12
13 #if defined(USE_X11)
14 #include "chrome/browser/chromeos/events/xinput_hierarchy_changed_event_listener .h"
15 #endif
16
14 using content::BrowserThread; 17 using content::BrowserThread;
15 18
16 namespace chromeos { 19 namespace chromeos {
17 namespace system { 20 namespace system {
18 21
19 PointerDeviceObserver::PointerDeviceObserver() 22 PointerDeviceObserver::PointerDeviceObserver()
20 : weak_factory_(this) { 23 : weak_factory_(this) {
21 } 24 }
22 25
23 PointerDeviceObserver::~PointerDeviceObserver() { 26 PointerDeviceObserver::~PointerDeviceObserver() {
27 #if defined(USE_X11)
24 XInputHierarchyChangedEventListener::GetInstance() 28 XInputHierarchyChangedEventListener::GetInstance()
25 ->RemoveObserver(this); 29 ->RemoveObserver(this);
30 #endif
26 } 31 }
27 32
28 void PointerDeviceObserver::Init() { 33 void PointerDeviceObserver::Init() {
34 #if defined(USE_X11)
29 XInputHierarchyChangedEventListener::GetInstance() 35 XInputHierarchyChangedEventListener::GetInstance()
30 ->AddObserver(this); 36 ->AddObserver(this);
37 #endif
31 } 38 }
32 39
33 void PointerDeviceObserver::CheckDevices() { 40 void PointerDeviceObserver::CheckDevices() {
34 CheckMouseExists(); 41 CheckMouseExists();
35 CheckTouchpadExists(); 42 CheckTouchpadExists();
36 } 43 }
37 44
38 void PointerDeviceObserver::AddObserver(Observer* observer) { 45 void PointerDeviceObserver::AddObserver(Observer* observer) {
39 observers_.AddObserver(observer); 46 observers_.AddObserver(observer);
40 } 47 }
(...skipping 24 matching lines...) Expand all
65 72
66 void PointerDeviceObserver::OnMouseExists(bool exists) { 73 void PointerDeviceObserver::OnMouseExists(bool exists) {
67 FOR_EACH_OBSERVER(Observer, observers_, MouseExists(exists)); 74 FOR_EACH_OBSERVER(Observer, observers_, MouseExists(exists));
68 } 75 }
69 76
70 PointerDeviceObserver::Observer::~Observer() { 77 PointerDeviceObserver::Observer::~Observer() {
71 } 78 }
72 79
73 } // namespace system 80 } // namespace system
74 } // namespace chromeos 81 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/chrome_browser_main_chromeos.cc ('k') | chrome/chrome_browser_chromeos.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698