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 #include "ash/system/chromeos/virtual_keyboard/virtual_keyboard_tray.h" | 5 #include "ash/system/chromeos/virtual_keyboard/virtual_keyboard_tray.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/system/status_area_widget.h" | 8 #include "ash/system/status_area_widget.h" |
9 #include "ash/system/tray/system_tray_notifier.h" | 9 #include "ash/system/tray/system_tray_notifier.h" |
10 #include "ash/system/tray/tray_constants.h" | 10 #include "ash/system/tray/tray_constants.h" |
11 #include "ash/system/tray/tray_utils.h" | 11 #include "ash/system/tray/tray_utils.h" |
12 #include "grit/ash_resources.h" | 12 #include "grit/ash_resources.h" |
13 #include "grit/ash_strings.h" | 13 #include "grit/ash_strings.h" |
14 #include "ui/base/l10n/l10n_util.h" | 14 #include "ui/base/l10n/l10n_util.h" |
15 #include "ui/base/resource/resource_bundle.h" | 15 #include "ui/base/resource/resource_bundle.h" |
16 #include "ui/events/event.h" | 16 #include "ui/events/event.h" |
17 #include "ui/gfx/image/image_skia.h" | 17 #include "ui/gfx/image/image_skia.h" |
18 #include "ui/keyboard/keyboard_controller.h" | 18 #include "ui/keyboard/keyboard_controller.h" |
19 #include "ui/views/controls/button/image_button.h" | 19 #include "ui/views/controls/button/image_button.h" |
20 | 20 |
21 namespace ash { | 21 namespace ash { |
22 namespace internal { | |
23 | |
24 namespace { | 22 namespace { |
25 | 23 |
26 class VirtualKeyboardButton : public views::ImageButton { | 24 class VirtualKeyboardButton : public views::ImageButton { |
27 public: | 25 public: |
28 VirtualKeyboardButton(views::ButtonListener* listener); | 26 VirtualKeyboardButton(views::ButtonListener* listener); |
29 virtual ~VirtualKeyboardButton(); | 27 virtual ~VirtualKeyboardButton(); |
30 | 28 |
31 // Overridden from views::ImageButton: | 29 // Overridden from views::ImageButton: |
32 virtual gfx::Size GetPreferredSize() OVERRIDE; | 30 virtual gfx::Size GetPreferredSize() OVERRIDE; |
33 | 31 |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 DCHECK_EQ(button_, sender); | 107 DCHECK_EQ(button_, sender); |
110 PerformAction(event); | 108 PerformAction(event); |
111 } | 109 } |
112 | 110 |
113 void VirtualKeyboardTray::OnAccessibilityModeChanged( | 111 void VirtualKeyboardTray::OnAccessibilityModeChanged( |
114 AccessibilityNotificationVisibility notify) { | 112 AccessibilityNotificationVisibility notify) { |
115 SetVisible(Shell::GetInstance()->accessibility_delegate()-> | 113 SetVisible(Shell::GetInstance()->accessibility_delegate()-> |
116 IsVirtualKeyboardEnabled()); | 114 IsVirtualKeyboardEnabled()); |
117 } | 115 } |
118 | 116 |
119 } // namespace internal | |
120 } // namespace ash | 117 } // namespace ash |
OLD | NEW |