| OLD | NEW |
| 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 Loading... |
| 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 ¶ms); | 91 ¶ms); |
| 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 Loading... |
| 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 |
| OLD | NEW |