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

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: sync Created 8 years, 11 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) 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 "googleurl/src/gurl.h" 16 #include "googleurl/src/gurl.h"
18 #include "ui/views/events/event.h" 17 #include "ui/views/events/event.h"
19 18
20 namespace chromeos { 19 namespace chromeos {
21 20
22 /////////////////////////////////////////////////////////////////////////////// 21 ///////////////////////////////////////////////////////////////////////////////
23 // HTMLPageDomView 22 // HTMLPageDomView
24 TabContents* HTMLPageDomView::CreateTabContents(Profile* profile, 23 TabContents* HTMLPageDomView::CreateTabContents(Profile* profile,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 SiteInstance::CreateSiteInstanceForURL(profile, url)); 62 SiteInstance::CreateSiteInstanceForURL(profile, url));
64 view()->SetWebContentsDelegate(this); 63 view()->SetWebContentsDelegate(this);
65 view()->LoadURL(url); 64 view()->LoadURL(url);
66 } 65 }
67 66
68 HTMLPageView* HTMLPageScreen::AllocateView() { 67 HTMLPageView* HTMLPageScreen::AllocateView() {
69 return new HTMLPageView(); 68 return new HTMLPageView();
70 } 69 }
71 70
72 void HTMLPageScreen::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) { 71 void HTMLPageScreen::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) {
73 HandleWebKeyboardEvent(view()->GetWidget(), event); 72 unhandled_keyboard_handler_.HandleKeyboardEvent(event,
73 view()->GetFocusManager());
74 } 74 }
75 75
76 /////////////////////////////////////////////////////////////////////////////// 76 ///////////////////////////////////////////////////////////////////////////////
77 // HTMLPageScreen, WebPageDelegate implementation: 77 // HTMLPageScreen, WebPageDelegate implementation:
78 void HTMLPageScreen::OnPageLoaded() { 78 void HTMLPageScreen::OnPageLoaded() {
79 StopTimeoutTimer(); 79 StopTimeoutTimer();
80 // Enable input methods (e.g. Chinese, Japanese) so that users could input 80 // Enable input methods (e.g. Chinese, Japanese) so that users could input
81 // their first and last names. 81 // their first and last names.
82 if (g_browser_process) { 82 if (g_browser_process) {
83 const std::string locale = g_browser_process->GetApplicationLocale(); 83 const std::string locale = g_browser_process->GetApplicationLocale();
(...skipping 26 matching lines...) Expand all
110 if (g_browser_process) { 110 if (g_browser_process) {
111 const std::string locale = g_browser_process->GetApplicationLocale(); 111 const std::string locale = g_browser_process->GetApplicationLocale();
112 input_method::InputMethodManager* manager = 112 input_method::InputMethodManager* manager =
113 input_method::InputMethodManager::GetInstance(); 113 input_method::InputMethodManager::GetInstance();
114 manager->EnableInputMethods(locale, input_method::kKeyboardLayoutsOnly, ""); 114 manager->EnableInputMethods(locale, input_method::kKeyboardLayoutsOnly, "");
115 } 115 }
116 delegate()->GetObserver()->OnExit(code); 116 delegate()->GetObserver()->OnExit(code);
117 } 117 }
118 118
119 } // namespace chromeos 119 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/html_page_screen.h ('k') | chrome/browser/chromeos/login/registration_screen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698