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

Side by Side Diff: chrome/browser/chromeos/input_method/mode_indicator_controller.cc

Issue 680383008: Move ash/ime to ui/chromeos/ime (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@athena_do_not_use_ash48_global_command
Patch Set: Created 6 years, 1 month 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/chromeos/input_method/mode_indicator_controller.h" 5 #include "chrome/browser/chromeos/input_method/mode_indicator_controller.h"
6 6
7 #include "ash/ime/mode_indicator_view.h"
8 #include "ash/shell.h" 7 #include "ash/shell.h"
9 #include "ash/shell_window_ids.h" 8 #include "ash/shell_window_ids.h"
10 #include "ash/wm/window_util.h" 9 #include "ash/wm/window_util.h"
11 #include "base/logging.h" 10 #include "base/logging.h"
12 #include "base/strings/utf_string_conversions.h" 11 #include "base/strings/utf_string_conversions.h"
13 #include "chrome/browser/chromeos/input_method/input_method_util.h" 12 #include "chrome/browser/chromeos/input_method/input_method_util.h"
13 #include "ui/chromeos/ime/mode_indicator_view.h"
14 14
15 namespace chromeos { 15 namespace chromeos {
16 namespace input_method { 16 namespace input_method {
17 17
18 namespace { 18 namespace {
19 ModeIndicatorObserverInterface* g_mode_indicator_observer_for_testing_ = NULL; 19 ModeIndicatorObserverInterface* g_mode_indicator_observer_for_testing_ = NULL;
20 } // namespace 20 } // namespace
21 21
22 class ModeIndicatorObserver : public ModeIndicatorObserverInterface { 22 class ModeIndicatorObserver : public ModeIndicatorObserverInterface {
23 public: 23 public:
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 101
102 // Get the short name of the changed input method (e.g. US, JA, etc.) 102 // Get the short name of the changed input method (e.g. US, JA, etc.)
103 const InputMethodDescriptor descriptor = 103 const InputMethodDescriptor descriptor =
104 imm_->GetActiveIMEState()->GetCurrentInputMethod(); 104 imm_->GetActiveIMEState()->GetCurrentInputMethod();
105 const base::string16 short_name = 105 const base::string16 short_name =
106 imm_->GetInputMethodUtil()->GetInputMethodShortName(descriptor); 106 imm_->GetInputMethodUtil()->GetInputMethodShortName(descriptor);
107 107
108 aura::Window* parent = 108 aura::Window* parent =
109 ash::Shell::GetContainer(ash::wm::GetActiveWindow()->GetRootWindow(), 109 ash::Shell::GetContainer(ash::wm::GetActiveWindow()->GetRootWindow(),
110 ash::kShellWindowId_SettingBubbleContainer); 110 ash::kShellWindowId_SettingBubbleContainer);
111 ash::ime::ModeIndicatorView* mi_view = new ash::ime::ModeIndicatorView( 111 ui::ime::ModeIndicatorView* mi_view = new ui::ime::ModeIndicatorView(
112 parent, cursor_bounds_, short_name); 112 parent, cursor_bounds_, short_name);
113 views::BubbleDelegateView::CreateBubble(mi_view); 113 views::BubbleDelegateView::CreateBubble(mi_view);
114 114
115 views::Widget* mi_widget = mi_view->GetWidget(); 115 views::Widget* mi_widget = mi_view->GetWidget();
116 if (GetModeIndicatorObserverForTesting()) 116 if (GetModeIndicatorObserverForTesting())
117 GetModeIndicatorObserverForTesting()->AddModeIndicatorWidget(mi_widget); 117 GetModeIndicatorObserverForTesting()->AddModeIndicatorWidget(mi_widget);
118 118
119 mi_observer_->AddModeIndicatorWidget(mi_widget); 119 mi_observer_->AddModeIndicatorWidget(mi_widget);
120 mi_view->ShowAndFadeOut(); 120 mi_view->ShowAndFadeOut();
121 } 121 }
122 122
123 } // namespace input_method 123 } // namespace input_method
124 } // namespace chromeos 124 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698