Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(363)

Side by Side Diff: ash/system/ime_menu/ime_list_view.cc

Issue 2917683003: chromeos: Remove the last IME methods from ash::SystemTrayDelegate (Closed)
Patch Set: cleanup Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/system/ime/tray_ime_chromeos_unittest.cc ('k') | ash/system/ime_menu/ime_menu_tray.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_list_view.h" 5 #include "ash/system/ime_menu/ime_list_view.h"
6 6
7 #include "ash/ime/ime_switch_type.h" 7 #include "ash/ime/ime_switch_type.h"
8 #include "ash/resources/grit/ash_resources.h" 8 #include "ash/resources/grit/ash_resources.h"
9 #include "ash/resources/vector_icons/vector_icons.h" 9 #include "ash/resources/vector_icons/vector_icons.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
11 #include "ash/shell_port.h" 11 #include "ash/shell_port.h"
12 #include "ash/strings/grit/ash_strings.h" 12 #include "ash/strings/grit/ash_strings.h"
13 #include "ash/system/ime/ime_util.h"
13 #include "ash/system/tray/actionable_view.h" 14 #include "ash/system/tray/actionable_view.h"
14 #include "ash/system/tray/ime_info.h" 15 #include "ash/system/tray/ime_info.h"
15 #include "ash/system/tray/system_menu_button.h" 16 #include "ash/system/tray/system_menu_button.h"
16 #include "ash/system/tray/system_tray_delegate.h"
17 #include "ash/system/tray/tray_constants.h" 17 #include "ash/system/tray/tray_constants.h"
18 #include "ash/system/tray/tray_details_view.h" 18 #include "ash/system/tray/tray_details_view.h"
19 #include "ash/system/tray/tray_popup_header_button.h" 19 #include "ash/system/tray/tray_popup_header_button.h"
20 #include "ash/system/tray/tray_popup_item_style.h" 20 #include "ash/system/tray/tray_popup_item_style.h"
21 #include "ash/system/tray/tray_popup_utils.h" 21 #include "ash/system/tray/tray_popup_utils.h"
22 #include "ash/system/tray/tri_view.h" 22 #include "ash/system/tray/tri_view.h"
23 #include "base/metrics/histogram_macros.h" 23 #include "base/metrics/histogram_macros.h"
24 #include "ui/accessibility/ax_node_data.h" 24 #include "ui/accessibility/ax_node_data.h"
25 #include "ui/base/ime/chromeos/input_method_manager.h" 25 #include "ui/base/ime/chromeos/input_method_manager.h"
26 #include "ui/base/l10n/l10n_util.h" 26 #include "ui/base/l10n/l10n_util.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 ImeListView::ImeListView(SystemTrayItem* owner) 189 ImeListView::ImeListView(SystemTrayItem* owner)
190 : TrayDetailsView(owner), 190 : TrayDetailsView(owner),
191 last_item_selected_with_keyboard_(false), 191 last_item_selected_with_keyboard_(false),
192 should_focus_ime_after_selection_with_keyboard_(false), 192 should_focus_ime_after_selection_with_keyboard_(false),
193 current_ime_view_(nullptr) {} 193 current_ime_view_(nullptr) {}
194 194
195 ImeListView::~ImeListView() {} 195 ImeListView::~ImeListView() {}
196 196
197 void ImeListView::Init(bool show_keyboard_toggle, 197 void ImeListView::Init(bool show_keyboard_toggle,
198 SingleImeBehavior single_ime_behavior) { 198 SingleImeBehavior single_ime_behavior) {
199 SystemTrayDelegate* delegate = Shell::Get()->system_tray_delegate(); 199 IMEInfoList list = ime_util::GetAvailableIMEList();
200 IMEInfoList list; 200 IMEPropertyInfoList property_list = ime_util::GetCurrentIMEProperties();
201 delegate->GetAvailableIMEList(&list);
202 IMEPropertyInfoList property_list;
203 delegate->GetCurrentIMEProperties(&property_list);
204 Update(list, property_list, show_keyboard_toggle, single_ime_behavior); 201 Update(list, property_list, show_keyboard_toggle, single_ime_behavior);
205 } 202 }
206 203
207 void ImeListView::Update(const IMEInfoList& list, 204 void ImeListView::Update(const IMEInfoList& list,
208 const IMEPropertyInfoList& property_list, 205 const IMEPropertyInfoList& property_list,
209 bool show_keyboard_toggle, 206 bool show_keyboard_toggle,
210 SingleImeBehavior single_ime_behavior) { 207 SingleImeBehavior single_ime_behavior) {
211 ResetImeListView(); 208 ResetImeListView();
212 ime_map_.clear(); 209 ime_map_.clear();
213 property_map_.clear(); 210 property_map_.clear();
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 ImeListViewTestApi::ImeListViewTestApi(ImeListView* ime_list_view) 360 ImeListViewTestApi::ImeListViewTestApi(ImeListView* ime_list_view)
364 : ime_list_view_(ime_list_view) {} 361 : ime_list_view_(ime_list_view) {}
365 362
366 ImeListViewTestApi::~ImeListViewTestApi() {} 363 ImeListViewTestApi::~ImeListViewTestApi() {}
367 364
368 views::View* ImeListViewTestApi::GetToggleView() const { 365 views::View* ImeListViewTestApi::GetToggleView() const {
369 return ime_list_view_->keyboard_status_row_->toggle(); 366 return ime_list_view_->keyboard_status_row_->toggle();
370 } 367 }
371 368
372 } // namespace ash 369 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/ime/tray_ime_chromeos_unittest.cc ('k') | ash/system/ime_menu/ime_menu_tray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698