| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 StatusAreaViewChromeos::ScreenMode WebUILoginView::GetScreenMode() { | 373 StatusAreaViewChromeos::ScreenMode WebUILoginView::GetScreenMode() { |
| 374 return StatusAreaViewChromeos::LOGIN_MODE_WEBUI; | 374 return StatusAreaViewChromeos::LOGIN_MODE_WEBUI; |
| 375 } | 375 } |
| 376 | 376 |
| 377 views::Widget::InitParams::Type WebUILoginView::GetStatusAreaWidgetType() { | 377 views::Widget::InitParams::Type WebUILoginView::GetStatusAreaWidgetType() { |
| 378 return views::Widget::InitParams::TYPE_WINDOW_FRAMELESS; | 378 return views::Widget::InitParams::TYPE_WINDOW_FRAMELESS; |
| 379 } | 379 } |
| 380 | 380 |
| 381 // WebUILoginView private: ----------------------------------------------------- | 381 // WebUILoginView private: ----------------------------------------------------- |
| 382 | 382 |
| 383 bool WebUILoginView::HandleContextMenu(const ContextMenuParams& params) { | 383 bool WebUILoginView::HandleContextMenu( |
| 384 const content::ContextMenuParams& params) { |
| 384 // Do not show the context menu. | 385 // Do not show the context menu. |
| 385 #ifndef NDEBUG | 386 #ifndef NDEBUG |
| 386 return false; | 387 return false; |
| 387 #else | 388 #else |
| 388 return true; | 389 return true; |
| 389 #endif | 390 #endif |
| 390 } | 391 } |
| 391 | 392 |
| 392 bool WebUILoginView::IsPopupOrPanel(const WebContents* source) const { | 393 bool WebUILoginView::IsPopupOrPanel(const WebContents* source) const { |
| 393 return true; | 394 return true; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 419 // when the focus is inside an iframe. Only clear on KeyDown to prevent hiding | 420 // when the focus is inside an iframe. Only clear on KeyDown to prevent hiding |
| 420 // an immediate authentication error (See crbug.com/103643). | 421 // an immediate authentication error (See crbug.com/103643). |
| 421 if (event.type == WebKit::WebInputEvent::KeyDown) { | 422 if (event.type == WebKit::WebInputEvent::KeyDown) { |
| 422 content::WebUI* web_ui = GetWebUI(); | 423 content::WebUI* web_ui = GetWebUI(); |
| 423 if (web_ui) | 424 if (web_ui) |
| 424 web_ui->CallJavascriptFunction("cr.ui.Oobe.clearErrors"); | 425 web_ui->CallJavascriptFunction("cr.ui.Oobe.clearErrors"); |
| 425 } | 426 } |
| 426 } | 427 } |
| 427 | 428 |
| 428 } // namespace chromeos | 429 } // namespace chromeos |
| OLD | NEW |