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

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

Issue 9854025: Automatically remap Command key on an Apple keyboard to Control [part 2 of 2 - Chrome part] (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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.
17 virtual void DeviceAdded(int device_id) = 0;
18
19 // Called when a key either on a built-in keyboard or external one is pressed.
20 // |device_id| is the source of the key event which will be sent to the Chrome
21 // window shortly.
22 virtual void KeyPressedOrReleased(int device_id) = 0;
23
16 protected: 24 protected:
17 virtual ~DeviceHierarchyObserver() {} 25 virtual ~DeviceHierarchyObserver() {}
18 }; 26 };
19 27
20 } // namespace chromeos 28 } // namespace chromeos
21 29
22 #endif // CHROME_BROWSER_CHROMEOS_DEVICE_HIERARCHY_OBSERVER_H_ 30 #endif // CHROME_BROWSER_CHROMEOS_DEVICE_HIERARCHY_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698