OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/ime_menu/ime_menu_tray.h" | 5 #include "ash/system/ime_menu/ime_menu_tray.h" |
6 | 6 |
7 #include "ash/accessibility_delegate.h" | 7 #include "ash/accessibility_delegate.h" |
8 #include "ash/ash_constants.h" | 8 #include "ash/ash_constants.h" |
9 #include "ash/public/cpp/shell_window_ids.h" | 9 #include "ash/public/cpp/shell_window_ids.h" |
10 #include "ash/resources/grit/ash_resources.h" | 10 #include "ash/resources/grit/ash_resources.h" |
11 #include "ash/root_window_controller.h" | 11 #include "ash/root_window_controller.h" |
12 #include "ash/session/session_controller.h" | 12 #include "ash/session/session_controller.h" |
13 #include "ash/shelf/wm_shelf.h" | 13 #include "ash/shelf/shelf.h" |
14 #include "ash/shell.h" | 14 #include "ash/shell.h" |
15 #include "ash/shell_port.h" | 15 #include "ash/shell_port.h" |
16 #include "ash/strings/grit/ash_strings.h" | 16 #include "ash/strings/grit/ash_strings.h" |
17 #include "ash/system/ime_menu/ime_list_view.h" | 17 #include "ash/system/ime_menu/ime_list_view.h" |
18 #include "ash/system/tray/system_menu_button.h" | 18 #include "ash/system/tray/system_menu_button.h" |
19 #include "ash/system/tray/system_tray_controller.h" | 19 #include "ash/system/tray/system_tray_controller.h" |
20 #include "ash/system/tray/system_tray_delegate.h" | 20 #include "ash/system/tray/system_tray_delegate.h" |
21 #include "ash/system/tray/system_tray_notifier.h" | 21 #include "ash/system/tray/system_tray_notifier.h" |
22 #include "ash/system/tray/tray_constants.h" | 22 #include "ash/system/tray/tray_constants.h" |
23 #include "ash/system/tray/tray_container.h" | 23 #include "ash/system/tray/tray_container.h" |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 gfx::Range height_range = GetImeListViewRange(); | 273 gfx::Range height_range = GetImeListViewRange(); |
274 scroller()->ClipHeightTo(height_range.start(), height_range.end()); | 274 scroller()->ClipHeightTo(height_range.start(), height_range.end()); |
275 ImeListView::Layout(); | 275 ImeListView::Layout(); |
276 } | 276 } |
277 | 277 |
278 DISALLOW_COPY_AND_ASSIGN(ImeMenuListView); | 278 DISALLOW_COPY_AND_ASSIGN(ImeMenuListView); |
279 }; | 279 }; |
280 | 280 |
281 } // namespace | 281 } // namespace |
282 | 282 |
283 ImeMenuTray::ImeMenuTray(WmShelf* wm_shelf) | 283 ImeMenuTray::ImeMenuTray(Shelf* shelf) |
284 : TrayBackgroundView(wm_shelf), | 284 : TrayBackgroundView(shelf), |
285 label_(new ImeMenuLabel()), | 285 label_(new ImeMenuLabel()), |
286 show_keyboard_(false), | 286 show_keyboard_(false), |
287 force_show_keyboard_(false), | 287 force_show_keyboard_(false), |
288 keyboard_suppressed_(false), | 288 keyboard_suppressed_(false), |
289 show_bubble_after_keyboard_hidden_(false), | 289 show_bubble_after_keyboard_hidden_(false), |
290 weak_ptr_factory_(this) { | 290 weak_ptr_factory_(this) { |
291 SetInkDropMode(InkDropMode::ON); | 291 SetInkDropMode(InkDropMode::ON); |
292 SetupLabelForTray(label_); | 292 SetupLabelForTray(label_); |
293 label_->SetElideBehavior(gfx::TRUNCATE); | 293 label_->SetElideBehavior(gfx::TRUNCATE); |
294 tray_container()->AddChildView(label_); | 294 tray_container()->AddChildView(label_); |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 else | 551 else |
552 label_->SetText(current_ime_.short_name); | 552 label_->SetText(current_ime_.short_name); |
553 } | 553 } |
554 | 554 |
555 void ImeMenuTray::DisableVirtualKeyboard() { | 555 void ImeMenuTray::DisableVirtualKeyboard() { |
556 Shell::Get()->accessibility_delegate()->SetVirtualKeyboardEnabled(false); | 556 Shell::Get()->accessibility_delegate()->SetVirtualKeyboardEnabled(false); |
557 force_show_keyboard_ = false; | 557 force_show_keyboard_ = false; |
558 } | 558 } |
559 | 559 |
560 } // namespace ash | 560 } // namespace ash |
OLD | NEW |