| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 ASH_SYSTEM_CHROMEOS_VIRTUAL_KEYBOARD_VIRTUAL_KEYBOARD_TRAY_H_ | 5 #ifndef ASH_SYSTEM_CHROMEOS_VIRTUAL_KEYBOARD_VIRTUAL_KEYBOARD_TRAY_H_ |
| 6 #define ASH_SYSTEM_CHROMEOS_VIRTUAL_KEYBOARD_VIRTUAL_KEYBOARD_TRAY_H_ | 6 #define ASH_SYSTEM_CHROMEOS_VIRTUAL_KEYBOARD_VIRTUAL_KEYBOARD_TRAY_H_ |
| 7 | 7 |
| 8 #include "ash/common/keyboard/keyboard_ui_observer.h" | 8 #include "ash/common/keyboard/keyboard_ui_observer.h" |
| 9 #include "ash/common/system/tray/tray_background_view.h" | 9 #include "ash/common/system/tray/tray_background_view.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "ui/views/controls/button/button.h" | 11 #include "ui/views/controls/button/button.h" |
| 12 | 12 |
| 13 namespace views { | 13 namespace views { |
| 14 class ImageButton; | 14 class ImageButton; |
| 15 } | 15 } |
| 16 | 16 |
| 17 namespace ash { | 17 namespace ash { |
| 18 class StatusAreaWidget; | |
| 19 | 18 |
| 20 // TODO(sky): make this visible on non-chromeos platforms. | 19 // TODO(sky): make this visible on non-chromeos platforms. |
| 21 class VirtualKeyboardTray : public TrayBackgroundView, | 20 class VirtualKeyboardTray : public TrayBackgroundView, |
| 22 public views::ButtonListener, | 21 public views::ButtonListener, |
| 23 public KeyboardUIObserver { | 22 public KeyboardUIObserver { |
| 24 public: | 23 public: |
| 25 explicit VirtualKeyboardTray(StatusAreaWidget* status_area_widget); | 24 explicit VirtualKeyboardTray(WmShelf* wm_shelf); |
| 26 ~VirtualKeyboardTray() override; | 25 ~VirtualKeyboardTray() override; |
| 27 | 26 |
| 28 // TrayBackgroundView: | 27 // TrayBackgroundView: |
| 29 void SetShelfAlignment(ShelfAlignment alignment) override; | 28 void SetShelfAlignment(ShelfAlignment alignment) override; |
| 30 base::string16 GetAccessibleNameForTray() override; | 29 base::string16 GetAccessibleNameForTray() override; |
| 31 void HideBubbleWithView(const views::TrayBubbleView* bubble_view) override; | 30 void HideBubbleWithView(const views::TrayBubbleView* bubble_view) override; |
| 32 void ClickedOutsideBubble() override; | 31 void ClickedOutsideBubble() override; |
| 33 bool PerformAction(const ui::Event& event) override; | 32 bool PerformAction(const ui::Event& event) override; |
| 34 | 33 |
| 35 // views::ButtonListener: | 34 // views::ButtonListener: |
| 36 void ButtonPressed(views::Button* sender, const ui::Event& event) override; | 35 void ButtonPressed(views::Button* sender, const ui::Event& event) override; |
| 37 | 36 |
| 38 // KeyboardUIObserver: | 37 // KeyboardUIObserver: |
| 39 void OnKeyboardEnabledStateChanged(bool new_value) override; | 38 void OnKeyboardEnabledStateChanged(bool new_value) override; |
| 40 | 39 |
| 41 private: | 40 private: |
| 42 views::ImageButton* button_; // Not owned. | 41 views::ImageButton* button_; // Not owned. |
| 43 | 42 |
| 44 DISALLOW_COPY_AND_ASSIGN(VirtualKeyboardTray); | 43 DISALLOW_COPY_AND_ASSIGN(VirtualKeyboardTray); |
| 45 }; | 44 }; |
| 46 | 45 |
| 47 } // namespace ash | 46 } // namespace ash |
| 48 | 47 |
| 49 #endif // ASH_SYSTEM_CHROMEOS_VIRTUAL_KEYBOARD_VIRTUAL_KEYBOARD_TRAY_H_ | 48 #endif // ASH_SYSTEM_CHROMEOS_VIRTUAL_KEYBOARD_VIRTUAL_KEYBOARD_TRAY_H_ |
| OLD | NEW |