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

Side by Side Diff: chrome/browser/ui/ash/ime_controller_chromeos.cc

Issue 2891263002: chromeos: Remove some IME methods from ash::SystemTrayDelegate (Closed)
Patch Set: rebase Created 3 years, 7 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/ui/ash/ime_controller_chromeos.h"
6
7 #include "ui/base/accelerators/accelerator.h"
8 #include "ui/base/ime/chromeos/input_method_manager.h"
9
10 bool ImeController::CanCycleIme() {
11 chromeos::input_method::InputMethodManager* manager =
12 chromeos::input_method::InputMethodManager::Get();
13 DCHECK(manager);
14 if (!manager->GetActiveIMEState()) {
15 LOG(WARNING) << "Cannot cycle through input methods as they are not "
16 "initialized yet.";
17 return false;
18 }
19 return manager->GetActiveIMEState()->CanCycleInputMethod();
20 }
21
22 void ImeController::HandleNextIme() {
23 chromeos::input_method::InputMethodManager* manager =
24 chromeos::input_method::InputMethodManager::Get();
25 manager->GetActiveIMEState()->SwitchToNextInputMethod();
26 }
27
28 void ImeController::HandlePreviousIme() {
29 chromeos::input_method::InputMethodManager* manager =
30 chromeos::input_method::InputMethodManager::Get();
31 manager->GetActiveIMEState()->SwitchToPreviousInputMethod();
32 }
33
34 bool ImeController::CanSwitchIme(const ui::Accelerator& accelerator) {
35 chromeos::input_method::InputMethodManager* manager =
36 chromeos::input_method::InputMethodManager::Get();
37 DCHECK(manager);
38 if (!manager->GetActiveIMEState()) {
39 LOG(WARNING) << "Cannot switch input methods as they are not "
40 "initialized yet.";
41 return false;
42 }
43 return manager->GetActiveIMEState()->CanSwitchInputMethod(accelerator);
44 }
45
46 void ImeController::HandleSwitchIme(const ui::Accelerator& accelerator) {
47 chromeos::input_method::InputMethodManager* manager =
48 chromeos::input_method::InputMethodManager::Get();
49 manager->GetActiveIMEState()->SwitchInputMethod(accelerator);
50 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/ime_controller_chromeos.h ('k') | chrome/browser/ui/ash/system_tray_delegate_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698