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

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

Issue 8907029: AURA/X11: Handle VKEY_MENU accelerator on content area (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 9 years 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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"
11 #include "chrome/browser/chromeos/input_method/input_method_util.h" 11 #include "chrome/browser/chromeos/input_method/input_method_util.h"
12 #include "chrome/browser/profiles/profile_manager.h" 12 #include "chrome/browser/profiles/profile_manager.h"
13 #include "chrome/browser/ui/views/handle_web_keyboard_event.h"
14 #include "chrome/common/url_constants.h" 13 #include "chrome/common/url_constants.h"
15 #include "content/browser/child_process_security_policy.h" 14 #include "content/browser/child_process_security_policy.h"
16 #include "content/browser/renderer_host/render_view_host.h" 15 #include "content/browser/renderer_host/render_view_host.h"
17 #include "content/browser/site_instance.h" 16 #include "content/browser/site_instance.h"
18 #include "content/browser/tab_contents/tab_contents.h" 17 #include "content/browser/tab_contents/tab_contents.h"
19 #include "googleurl/src/gurl.h" 18 #include "googleurl/src/gurl.h"
20 #include "net/url_request/url_request_about_job.h" 19 #include "net/url_request/url_request_about_job.h"
21 #include "net/url_request/url_request_filter.h" 20 #include "net/url_request/url_request_filter.h"
22 21
23 namespace chromeos { 22 namespace chromeos {
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 source->Stop(); 121 source->Stop();
123 // Host registration page and actual registration page hosted by 122 // Host registration page and actual registration page hosted by
124 // OEM partner doesn't contain links to external URLs. 123 // OEM partner doesn't contain links to external URLs.
125 LOG(WARNING) << "Navigate to unsupported url: " << params.url.spec(); 124 LOG(WARNING) << "Navigate to unsupported url: " << params.url.spec();
126 } 125 }
127 return NULL; 126 return NULL;
128 } 127 }
129 128
130 void RegistrationScreen::HandleKeyboardEvent( 129 void RegistrationScreen::HandleKeyboardEvent(
131 const NativeWebKeyboardEvent& event) { 130 const NativeWebKeyboardEvent& event) {
132 HandleWebKeyboardEvent(view()->GetWidget(), event); 131 unhandled_keyboard_handler_.HandleKeyboardEvent(event,
132 view()->GetFocusManager());
133 } 133 }
134 134
135 /////////////////////////////////////////////////////////////////////////////// 135 ///////////////////////////////////////////////////////////////////////////////
136 // RegistrationScreen, private: 136 // RegistrationScreen, private:
137 void RegistrationScreen::CloseScreen(ScreenObserver::ExitCodes code) { 137 void RegistrationScreen::CloseScreen(ScreenObserver::ExitCodes code) {
138 StopTimeoutTimer(); 138 StopTimeoutTimer();
139 // Disable input methods since they are not necessary to input username and 139 // Disable input methods since they are not necessary to input username and
140 // password. 140 // password.
141 if (g_browser_process) { 141 if (g_browser_process) {
142 const std::string locale = g_browser_process->GetApplicationLocale(); 142 const std::string locale = g_browser_process->GetApplicationLocale();
143 input_method::InputMethodManager* manager = 143 input_method::InputMethodManager* manager =
144 input_method::InputMethodManager::GetInstance(); 144 input_method::InputMethodManager::GetInstance();
145 manager->EnableInputMethods(locale, input_method::kKeyboardLayoutsOnly, ""); 145 manager->EnableInputMethods(locale, input_method::kKeyboardLayoutsOnly, "");
146 } 146 }
147 delegate()->GetObserver()->OnExit(code); 147 delegate()->GetObserver()->OnExit(code);
148 } 148 }
149 149
150 // static 150 // static
151 net::URLRequestJob* RegistrationScreen::Factory(net::URLRequest* request, 151 net::URLRequestJob* RegistrationScreen::Factory(net::URLRequest* request,
152 const std::string& scheme) { 152 const std::string& scheme) {
153 VLOG(1) << "Handling url: " << request->url().spec().c_str(); 153 VLOG(1) << "Handling url: " << request->url().spec().c_str();
154 return new net::URLRequestAboutJob(request); 154 return new net::URLRequestAboutJob(request);
155 } 155 }
156 156
157 } // namespace chromeos 157 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698