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

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

Issue 10837112: Add WebContents* to some more WebContentsDelegate methods (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 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 | Annotate | Revision Log
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/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
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
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/registration_screen.h ('k') | chrome/browser/chromeos/login/webui_login_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698