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

Side by Side Diff: chrome/browser/chromeos/login/html_page_screen.cc

Issue 9699067: Remove IME support from chromeos/login/html_page_screen.cc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 | Annotate | Revision Log
« 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/login/html_page_screen.h" 5 #include "chrome/browser/chromeos/login/html_page_screen.h"
6 6
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/chromeos/input_method/input_method_manager.h"
11 #include "chrome/browser/chromeos/input_method/input_method_util.h"
12 #include "chrome/browser/chromeos/login/screen_observer.h" 9 #include "chrome/browser/chromeos/login/screen_observer.h"
13 #include "chrome/browser/profiles/profile_manager.h" 10 #include "chrome/browser/profiles/profile_manager.h"
14 #include "content/public/browser/render_view_host.h" 11 #include "content/public/browser/render_view_host.h"
15 #include "content/public/browser/site_instance.h" 12 #include "content/public/browser/site_instance.h"
16 #include "googleurl/src/gurl.h" 13 #include "googleurl/src/gurl.h"
17 #include "ui/views/events/event.h" 14 #include "ui/views/events/event.h"
18 15
19 using content::SiteInstance; 16 using content::SiteInstance;
20 using content::WebContents; 17 using content::WebContents;
21 18
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 unhandled_keyboard_handler_.HandleKeyboardEvent(event, 61 unhandled_keyboard_handler_.HandleKeyboardEvent(event,
65 view()->GetFocusManager()); 62 view()->GetFocusManager());
66 } 63 }
67 64
68 /////////////////////////////////////////////////////////////////////////////// 65 ///////////////////////////////////////////////////////////////////////////////
69 // HTMLPageScreen, WebPageScreen implementation: 66 // HTMLPageScreen, WebPageScreen implementation:
70 void HTMLPageScreen::OnNetworkTimeout() { 67 void HTMLPageScreen::OnNetworkTimeout() {
71 VLOG(1) << "HTMLPageScreen::OnNetworkTimeout"; 68 VLOG(1) << "HTMLPageScreen::OnNetworkTimeout";
72 // Just show what we have now. We shouldn't exit from the screen on timeout. 69 // Just show what we have now. We shouldn't exit from the screen on timeout.
73 StopTimeoutTimer(); 70 StopTimeoutTimer();
74 // Enable input methods (e.g. Chinese, Japanese) so that users could input
75 // their first and last names.
76 if (g_browser_process) {
77 const std::string locale = g_browser_process->GetApplicationLocale();
78 input_method::InputMethodManager* manager =
79 input_method::InputMethodManager::GetInstance();
80 manager->EnableInputMethods(locale, input_method::kAllInputMethods, "");
81 }
82 view()->ShowPageContent(); 71 view()->ShowPageContent();
83 } 72 }
84 73
85 /////////////////////////////////////////////////////////////////////////////// 74 ///////////////////////////////////////////////////////////////////////////////
86 // HTMLPageScreen, private: 75 // HTMLPageScreen, private:
87 void HTMLPageScreen::CloseScreen(ScreenObserver::ExitCodes code) { 76 void HTMLPageScreen::CloseScreen(ScreenObserver::ExitCodes code) {
88 StopTimeoutTimer(); 77 StopTimeoutTimer();
89 // Disable input methods since they are not necessary to input username and
90 // password.
91 if (g_browser_process) {
92 const std::string locale = g_browser_process->GetApplicationLocale();
93 input_method::InputMethodManager* manager =
94 input_method::InputMethodManager::GetInstance();
95 manager->EnableInputMethods(locale, input_method::kKeyboardLayoutsOnly, "");
96 }
97 delegate()->GetObserver()->OnExit(code); 78 delegate()->GetObserver()->OnExit(code);
98 } 79 }
99 80
100 } // namespace chromeos 81 } // 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