OLD | NEW |
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/registration_screen.h" | 5 #include "chrome/browser/chromeos/login/registration_screen.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
10 #include "chrome/browser/chromeos/input_method/input_method_manager.h" | 10 #include "chrome/browser/chromeos/input_method/input_method_manager.h" |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 } else { | 109 } else { |
110 source->Stop(); | 110 source->Stop(); |
111 // Host registration page and actual registration page hosted by | 111 // Host registration page and actual registration page hosted by |
112 // OEM partner doesn't contain links to external URLs. | 112 // OEM partner doesn't contain links to external URLs. |
113 LOG(WARNING) << "Navigate to unsupported url: " << params.url.spec(); | 113 LOG(WARNING) << "Navigate to unsupported url: " << params.url.spec(); |
114 } | 114 } |
115 return NULL; | 115 return NULL; |
116 } | 116 } |
117 | 117 |
118 void RegistrationScreen::HandleKeyboardEvent( | 118 void RegistrationScreen::HandleKeyboardEvent( |
| 119 content::WebContents* source, |
119 const NativeWebKeyboardEvent& event) { | 120 const NativeWebKeyboardEvent& event) { |
120 unhandled_keyboard_handler_.HandleKeyboardEvent(event, | 121 unhandled_keyboard_handler_.HandleKeyboardEvent(event, |
121 view()->GetFocusManager()); | 122 view()->GetFocusManager()); |
122 } | 123 } |
123 | 124 |
124 /////////////////////////////////////////////////////////////////////////////// | 125 /////////////////////////////////////////////////////////////////////////////// |
125 // RegistrationScreen, private: | 126 // RegistrationScreen, private: |
126 void RegistrationScreen::CloseScreen(ScreenObserver::ExitCodes code) { | 127 void RegistrationScreen::CloseScreen(ScreenObserver::ExitCodes code) { |
127 StopTimeoutTimer(); | 128 StopTimeoutTimer(); |
128 // Disable input methods since they are not necessary to input username and | 129 // Disable input methods since they are not necessary to input username and |
129 // password. | 130 // password. |
130 if (g_browser_process) { | 131 if (g_browser_process) { |
131 const std::string locale = g_browser_process->GetApplicationLocale(); | 132 const std::string locale = g_browser_process->GetApplicationLocale(); |
132 input_method::InputMethodManager* manager = | 133 input_method::InputMethodManager* manager = |
133 input_method::InputMethodManager::GetInstance(); | 134 input_method::InputMethodManager::GetInstance(); |
134 manager->EnableLayouts(locale, ""); | 135 manager->EnableLayouts(locale, ""); |
135 } | 136 } |
136 delegate()->GetObserver()->OnExit(code); | 137 delegate()->GetObserver()->OnExit(code); |
137 } | 138 } |
138 | 139 |
139 // static | 140 // static |
140 net::URLRequestJob* RegistrationScreen::Factory(net::URLRequest* request, | 141 net::URLRequestJob* RegistrationScreen::Factory(net::URLRequest* request, |
141 const std::string& scheme) { | 142 const std::string& scheme) { |
142 VLOG(1) << "Handling url: " << request->url().spec().c_str(); | 143 VLOG(1) << "Handling url: " << request->url().spec().c_str(); |
143 return new net::URLRequestAboutJob(request); | 144 return new net::URLRequestAboutJob(request); |
144 } | 145 } |
145 | 146 |
146 } // namespace chromeos | 147 } // namespace chromeos |
OLD | NEW |