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

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

Issue 2274013003: Keeps the opt-in IME menu in lock screen. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "chrome/browser/chromeos/input_method/input_method_manager_impl.h" 5 #include "chrome/browser/chromeos/input_method/input_method_manager_impl.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> // std::find 9 #include <algorithm> // std::find
10 #include <memory> 10 #include <memory>
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after
920 } 920 }
921 921
922 InputMethodManager::UISessionState InputMethodManagerImpl::GetUISessionState() { 922 InputMethodManager::UISessionState InputMethodManagerImpl::GetUISessionState() {
923 return ui_session_; 923 return ui_session_;
924 } 924 }
925 925
926 void InputMethodManagerImpl::SetUISessionState(UISessionState new_ui_session) { 926 void InputMethodManagerImpl::SetUISessionState(UISessionState new_ui_session) {
927 ui_session_ = new_ui_session; 927 ui_session_ = new_ui_session;
928 if (ui_session_ == STATE_TERMINATING && candidate_window_controller_.get()) 928 if (ui_session_ == STATE_TERMINATING && candidate_window_controller_.get())
929 candidate_window_controller_.reset(); 929 candidate_window_controller_.reset();
930
931 // The expanded IME menu is only supportive with 'normal' screen type. It
932 // should be deactivated when the screen type is not 'normal', and be
933 // re-activated when changing back.
934 if (is_ime_menu_activated_ && ui_session_ != STATE_TERMINATING) {
935 FOR_EACH_OBSERVER(
936 InputMethodManager::ImeMenuObserver, ime_menu_observers_,
937 ImeMenuActivationChanged(ui_session_ == STATE_BROWSER_SCREEN));
938 }
Shu Chen 2016/08/25 11:49:32 Per offline discussion, this logic should be moved
Azure Wei 2016/08/26 09:30:35 Done. PTAL.
939 } 930 }
940 931
941 void InputMethodManagerImpl::OnUserAddingStarted() { 932 void InputMethodManagerImpl::OnUserAddingStarted() {
942 if (ui_session_ == STATE_BROWSER_SCREEN) 933 if (ui_session_ == STATE_BROWSER_SCREEN)
943 SetUISessionState(STATE_SECONDARY_LOGIN_SCREEN); 934 SetUISessionState(STATE_SECONDARY_LOGIN_SCREEN);
944 } 935 }
945 936
946 void InputMethodManagerImpl::OnUserAddingFinished() { 937 void InputMethodManagerImpl::OnUserAddingFinished() {
947 if (ui_session_ == STATE_SECONDARY_LOGIN_SCREEN) 938 if (ui_session_ == STATE_SECONDARY_LOGIN_SCREEN)
948 SetUISessionState(STATE_BROWSER_SCREEN); 939 SetUISessionState(STATE_BROWSER_SCREEN);
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
1209 1200
1210 void InputMethodManagerImpl::NotifyImeMenuItemsChanged( 1201 void InputMethodManagerImpl::NotifyImeMenuItemsChanged(
1211 const std::string& engine_id, 1202 const std::string& engine_id,
1212 const std::vector<InputMethodManager::MenuItem>& items) { 1203 const std::vector<InputMethodManager::MenuItem>& items) {
1213 FOR_EACH_OBSERVER(InputMethodManager::ImeMenuObserver, ime_menu_observers_, 1204 FOR_EACH_OBSERVER(InputMethodManager::ImeMenuObserver, ime_menu_observers_,
1214 ImeMenuItemsChanged(engine_id, items)); 1205 ImeMenuItemsChanged(engine_id, items));
1215 } 1206 }
1216 1207
1217 } // namespace input_method 1208 } // namespace input_method
1218 } // namespace chromeos 1209 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698