| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/common/system/ime/tray_ime_chromeos.h" | 5 #include "ash/common/system/ime/tray_ime_chromeos.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "ash/common/material_design/material_design_controller.h" | 9 #include "ash/common/material_design/material_design_controller.h" |
| 10 #include "ash/common/session/session_state_delegate.h" | 10 #include "ash/common/session/session_state_delegate.h" |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 | 107 |
| 108 private: | 108 private: |
| 109 DISALLOW_COPY_AND_ASSIGN(IMEDefaultView); | 109 DISALLOW_COPY_AND_ASSIGN(IMEDefaultView); |
| 110 }; | 110 }; |
| 111 | 111 |
| 112 class IMEDetailedView : public ImeListView { | 112 class IMEDetailedView : public ImeListView { |
| 113 public: | 113 public: |
| 114 IMEDetailedView(SystemTrayItem* owner, | 114 IMEDetailedView(SystemTrayItem* owner, |
| 115 LoginStatus login, | 115 LoginStatus login, |
| 116 bool show_keyboard_toggle) | 116 bool show_keyboard_toggle) |
| 117 : ImeListView(owner, show_keyboard_toggle, ImeListView::HIDE_SINGLE_IME), | 117 : ImeListView(owner, |
| 118 show_keyboard_toggle, |
| 119 ImeListView::HIDE_SINGLE_IME, |
| 120 gfx::Range::InvalidRange()), |
| 118 login_(login), | 121 login_(login), |
| 119 settings_(nullptr), | 122 settings_(nullptr), |
| 120 settings_button_(nullptr) { | 123 settings_button_(nullptr) { |
| 121 SystemTrayDelegate* delegate = WmShell::Get()->system_tray_delegate(); | 124 SystemTrayDelegate* delegate = WmShell::Get()->system_tray_delegate(); |
| 122 IMEInfoList list; | 125 IMEInfoList list; |
| 123 delegate->GetAvailableIMEList(&list); | 126 delegate->GetAvailableIMEList(&list); |
| 124 IMEPropertyInfoList property_list; | 127 IMEPropertyInfoList property_list; |
| 125 delegate->GetCurrentIMEProperties(&property_list); | 128 delegate->GetCurrentIMEProperties(&property_list); |
| 126 Update(list, property_list, show_keyboard_toggle, | 129 Update(list, property_list, show_keyboard_toggle, |
| 127 ImeListView::HIDE_SINGLE_IME); | 130 ImeListView::HIDE_SINGLE_IME); |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 else | 346 else |
| 344 Update(); | 347 Update(); |
| 345 } | 348 } |
| 346 | 349 |
| 347 bool TrayIME::ShouldDefaultViewBeVisible() { | 350 bool TrayIME::ShouldDefaultViewBeVisible() { |
| 348 return is_visible_ && (ime_list_.size() > 1 || property_list_.size() > 1 || | 351 return is_visible_ && (ime_list_.size() > 1 || property_list_.size() > 1 || |
| 349 ShouldShowKeyboardToggle()); | 352 ShouldShowKeyboardToggle()); |
| 350 } | 353 } |
| 351 | 354 |
| 352 } // namespace ash | 355 } // namespace ash |
| OLD | NEW |