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

Side by Side Diff: chrome/browser/chromeos/device_hierarchy_observer.h

Issue 9963027: ash: Remap Command on Apple keyboards to Control [2/2] (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: apply my own review feedback from http://codereview.chromium.org/9854025/ Created 8 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_CHROMEOS_DEVICE_HIERARCHY_OBSERVER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_DEVICE_HIERARCHY_OBSERVER_H_
6 #define CHROME_BROWSER_CHROMEOS_DEVICE_HIERARCHY_OBSERVER_H_ 6 #define CHROME_BROWSER_CHROMEOS_DEVICE_HIERARCHY_OBSERVER_H_
7 #pragma once 7 #pragma once
8 8
9 namespace chromeos { 9 namespace chromeos {
10 10
11 // Observers receive notifications when a device has been added/removed. 11 // Observers receive notifications when a device has been added/removed.
12 class DeviceHierarchyObserver { 12 class DeviceHierarchyObserver {
13 public: 13 public:
14 virtual void DeviceHierarchyChanged() = 0; 14 virtual void DeviceHierarchyChanged() = 0;
15 15
16 // Called when a new device (e.g. an external USB keyboard) is attached or
17 // detached.
18 virtual void DeviceAdded(int device_id) = 0;
19 virtual void DeviceRemoved(int device_id) = 0;
20
21 // Called when a key on either a built-in keyboard or an external one is
22 // pressed. |device_id| is the source of the key event which will be sent to
23 // the Chrome window shortly.
24 virtual void DeviceKeyPressedOrReleased(int device_id) = 0;
25
16 protected: 26 protected:
17 virtual ~DeviceHierarchyObserver() {} 27 virtual ~DeviceHierarchyObserver() {}
18 }; 28 };
19 29
20 } // namespace chromeos 30 } // namespace chromeos
21 31
22 #endif // CHROME_BROWSER_CHROMEOS_DEVICE_HIERARCHY_OBSERVER_H_ 32 #endif // CHROME_BROWSER_CHROMEOS_DEVICE_HIERARCHY_OBSERVER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main_extra_parts_ash.cc ('k') | chrome/browser/chromeos/system/pointer_device_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698