OLD | NEW |
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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "chrome/browser/chromeos/input_method/input_method_util.h" | 10 #include "chrome/browser/chromeos/input_method/input_method_util.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 // TODO(komatsu): Show the mode indicator in the right bottom of the | 86 // TODO(komatsu): Show the mode indicator in the right bottom of the |
87 // display when the launch bar is hidden and the focus is out. To | 87 // display when the launch bar is hidden and the focus is out. To |
88 // implement it, we should consider to use message center or system | 88 // implement it, we should consider to use message center or system |
89 // notification. Note, launch bar can be vertical and can be placed | 89 // notification. Note, launch bar can be vertical and can be placed |
90 // right/left side of display. | 90 // right/left side of display. |
91 if (!is_focused_) | 91 if (!is_focused_) |
92 return; | 92 return; |
93 | 93 |
94 // Get the short name of the changed input method (e.g. US, JA, etc.) | 94 // Get the short name of the changed input method (e.g. US, JA, etc.) |
95 const InputMethodDescriptor descriptor = imm_->GetCurrentInputMethod(); | 95 const InputMethodDescriptor descriptor = imm_->GetCurrentInputMethod(); |
96 const string16 short_name = | 96 const base::string16 short_name = |
97 imm_->GetInputMethodUtil()->GetInputMethodShortName(descriptor); | 97 imm_->GetInputMethodUtil()->GetInputMethodShortName(descriptor); |
98 | 98 |
99 ModeIndicatorDelegateView* mi_delegate_view = | 99 ModeIndicatorDelegateView* mi_delegate_view = |
100 new ModeIndicatorDelegateView(cursor_bounds_, short_name); | 100 new ModeIndicatorDelegateView(cursor_bounds_, short_name); |
101 views::BubbleDelegateView::CreateBubble(mi_delegate_view); | 101 views::BubbleDelegateView::CreateBubble(mi_delegate_view); |
102 mi_observer_->UpdateActiveModeIndicator(mi_delegate_view->GetWidget()); | 102 mi_observer_->UpdateActiveModeIndicator(mi_delegate_view->GetWidget()); |
103 mi_delegate_view->ShowAndFadeOut(); | 103 mi_delegate_view->ShowAndFadeOut(); |
104 } | 104 } |
105 | 105 |
106 } // namespace input_method | 106 } // namespace input_method |
107 } // namespace chromeos | 107 } // namespace chromeos |
OLD | NEW |