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

Side by Side Diff: chrome/browser/chromeos/login/html_page_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/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" 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/chromeos/login/screen_observer.h" 12 #include "chrome/browser/chromeos/login/screen_observer.h"
13 #include "chrome/browser/profiles/profile_manager.h" 13 #include "chrome/browser/profiles/profile_manager.h"
14 #include "chrome/browser/ui/views/handle_web_keyboard_event.h"
15 #include "content/browser/renderer_host/render_view_host.h" 14 #include "content/browser/renderer_host/render_view_host.h"
16 #include "content/browser/site_instance.h" 15 #include "content/browser/site_instance.h"
17 #include "content/browser/tab_contents/tab_contents.h" 16 #include "content/browser/tab_contents/tab_contents.h"
18 #include "googleurl/src/gurl.h" 17 #include "googleurl/src/gurl.h"
19 #include "ui/views/events/event.h" 18 #include "ui/views/events/event.h"
20 19
21 namespace chromeos { 20 namespace chromeos {
22 21
23 /////////////////////////////////////////////////////////////////////////////// 22 ///////////////////////////////////////////////////////////////////////////////
24 // HTMLPageDomView 23 // HTMLPageDomView
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 SiteInstance::CreateSiteInstanceForURL(profile, url)); 63 SiteInstance::CreateSiteInstanceForURL(profile, url));
65 view()->SetTabContentsDelegate(this); 64 view()->SetTabContentsDelegate(this);
66 view()->LoadURL(url); 65 view()->LoadURL(url);
67 } 66 }
68 67
69 HTMLPageView* HTMLPageScreen::AllocateView() { 68 HTMLPageView* HTMLPageScreen::AllocateView() {
70 return new HTMLPageView(); 69 return new HTMLPageView();
71 } 70 }
72 71
73 void HTMLPageScreen::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) { 72 void HTMLPageScreen::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) {
74 HandleWebKeyboardEvent(view()->GetWidget(), event); 73 unhandled_keyboard_handler_.HandleKeyboardEvent(event,
74 view()->GetFocusManager());
75 } 75 }
76 76
77 /////////////////////////////////////////////////////////////////////////////// 77 ///////////////////////////////////////////////////////////////////////////////
78 // HTMLPageScreen, WebPageDelegate implementation: 78 // HTMLPageScreen, WebPageDelegate implementation:
79 void HTMLPageScreen::OnPageLoaded() { 79 void HTMLPageScreen::OnPageLoaded() {
80 StopTimeoutTimer(); 80 StopTimeoutTimer();
81 // Enable input methods (e.g. Chinese, Japanese) so that users could input 81 // Enable input methods (e.g. Chinese, Japanese) so that users could input
82 // their first and last names. 82 // their first and last names.
83 if (g_browser_process) { 83 if (g_browser_process) {
84 const std::string locale = g_browser_process->GetApplicationLocale(); 84 const std::string locale = g_browser_process->GetApplicationLocale();
(...skipping 26 matching lines...) Expand all
111 if (g_browser_process) { 111 if (g_browser_process) {
112 const std::string locale = g_browser_process->GetApplicationLocale(); 112 const std::string locale = g_browser_process->GetApplicationLocale();
113 input_method::InputMethodManager* manager = 113 input_method::InputMethodManager* manager =
114 input_method::InputMethodManager::GetInstance(); 114 input_method::InputMethodManager::GetInstance();
115 manager->EnableInputMethods(locale, input_method::kKeyboardLayoutsOnly, ""); 115 manager->EnableInputMethods(locale, input_method::kKeyboardLayoutsOnly, "");
116 } 116 }
117 delegate()->GetObserver()->OnExit(code); 117 delegate()->GetObserver()->OnExit(code);
118 } 118 }
119 119
120 } // namespace chromeos 120 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698