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

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

Issue 7506004: [ChromeOS] Make WebUILoginView play nicer with focus. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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
« no previous file with comments | « chrome/browser/chromeos/login/webui_login_view.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/webui_login_view.h" 5 #include "chrome/browser/chromeos/login/webui_login_view.h"
6 6
7 #include "chrome/browser/chromeos/accessibility_util.h" 7 #include "chrome/browser/chromeos/accessibility_util.h"
8 #include "chrome/browser/chromeos/login/proxy_settings_dialog.h" 8 #include "chrome/browser/chromeos/login/proxy_settings_dialog.h"
9 #include "chrome/browser/chromeos/login/webui_login_display.h" 9 #include "chrome/browser/chromeos/login/webui_login_display.h"
10 #include "chrome/browser/chromeos/status/clock_menu_button.h" 10 #include "chrome/browser/chromeos/status/clock_menu_button.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 void WebUILoginView::UpdateWindowType() { 86 void WebUILoginView::UpdateWindowType() {
87 std::vector<int> params; 87 std::vector<int> params;
88 WmIpc::instance()->SetWindowType( 88 WmIpc::instance()->SetWindowType(
89 GTK_WIDGET(GetNativeWindow()), 89 GTK_WIDGET(GetNativeWindow()),
90 WM_IPC_WINDOW_LOGIN_WEBUI, 90 WM_IPC_WINDOW_LOGIN_WEBUI,
91 &params); 91 &params);
92 } 92 }
93 93
94 void WebUILoginView::LoadURL(const GURL & url) { 94 void WebUILoginView::LoadURL(const GURL & url) {
95 webui_login_->LoadURL(url); 95 webui_login_->LoadURL(url);
96 webui_login_->RequestFocus();
96 } 97 }
97 98
98 WebUI* WebUILoginView::GetWebUI() { 99 WebUI* WebUILoginView::GetWebUI() {
99 return webui_login_->tab_contents()->web_ui(); 100 return webui_login_->tab_contents()->web_ui();
100 } 101 }
101 102
102 void WebUILoginView::SetStatusAreaEnabled(bool enable) { 103 void WebUILoginView::SetStatusAreaEnabled(bool enable) {
103 if (status_area_) 104 if (status_area_)
104 status_area_->MakeButtonsActive(enable); 105 status_area_->MakeButtonsActive(enable);
105 } 106 }
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 205
205 bool WebUILoginView::HandleContextMenu(const ContextMenuParams& params) { 206 bool WebUILoginView::HandleContextMenu(const ContextMenuParams& params) {
206 // Do not show the context menu. 207 // Do not show the context menu.
207 #ifndef NDEBUG 208 #ifndef NDEBUG
208 return false; 209 return false;
209 #else 210 #else
210 return true; 211 return true;
211 #endif 212 #endif
212 } 213 }
213 214
215 bool WebUILoginView::TakeFocus(bool reverse) {
216 // Forward the focus back to web contents.
217 webui_login_->tab_contents()->FocusThroughTabTraversal(reverse);
218 return true;
219 }
220
214 } // namespace chromeos 221 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/webui_login_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698