| OLD | NEW | 
|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 COMPONENTS_EXO_KEYBOARD_DELEGATE_H_ | 5 #ifndef COMPONENTS_EXO_KEYBOARD_DELEGATE_H_ | 
| 6 #define COMPONENTS_EXO_KEYBOARD_DELEGATE_H_ | 6 #define COMPONENTS_EXO_KEYBOARD_DELEGATE_H_ | 
| 7 | 7 | 
| 8 #include <vector> | 8 #include <vector> | 
| 9 | 9 | 
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" | 
| (...skipping 18 matching lines...) Expand all  Loading... | 
| 29   virtual bool CanAcceptKeyboardEventsForSurface(Surface* surface) const = 0; | 29   virtual bool CanAcceptKeyboardEventsForSurface(Surface* surface) const = 0; | 
| 30 | 30 | 
| 31   // Called when keyboard focus enters a new valid target surface. | 31   // Called when keyboard focus enters a new valid target surface. | 
| 32   virtual void OnKeyboardEnter( | 32   virtual void OnKeyboardEnter( | 
| 33       Surface* surface, | 33       Surface* surface, | 
| 34       const std::vector<ui::DomCode>& pressed_keys) = 0; | 34       const std::vector<ui::DomCode>& pressed_keys) = 0; | 
| 35 | 35 | 
| 36   // Called when keyboard focus leaves a valid target surface. | 36   // Called when keyboard focus leaves a valid target surface. | 
| 37   virtual void OnKeyboardLeave(Surface* surface) = 0; | 37   virtual void OnKeyboardLeave(Surface* surface) = 0; | 
| 38 | 38 | 
| 39   // Called when pkeyboard key state changed. |pressed| is true when |key| | 39   // Called when keyboard key state changed. |pressed| is true when |key| | 
| 40   // was pressed and false if it was released. | 40   // was pressed and false if it was released. | 
| 41   virtual void OnKeyboardKey(base::TimeTicks time_stamp, | 41   virtual void OnKeyboardKey(base::TimeTicks time_stamp, | 
| 42                              ui::DomCode key, | 42                              ui::DomCode key, | 
| 43                              bool pressed) = 0; | 43                              bool pressed) = 0; | 
| 44 | 44 | 
| 45   // Called when keyboard modifier state changed. | 45   // Called when keyboard modifier state changed. | 
| 46   virtual void OnKeyboardModifiers(int modifier_flags) = 0; | 46   virtual void OnKeyboardModifiers(int modifier_flags) = 0; | 
| 47 | 47 | 
| 48  protected: | 48  protected: | 
| 49   virtual ~KeyboardDelegate() {} | 49   virtual ~KeyboardDelegate() {} | 
| 50 }; | 50 }; | 
| 51 | 51 | 
| 52 }  // namespace exo | 52 }  // namespace exo | 
| 53 | 53 | 
| 54 #endif  // COMPONENTS_EXO_KEYBOARD_DELEGATE_H_ | 54 #endif  // COMPONENTS_EXO_KEYBOARD_DELEGATE_H_ | 
| OLD | NEW | 
|---|