| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/ui/webui_login_view.h" | 5 #include "chrome/browser/chromeos/login/ui/webui_login_view.h" |
| 6 | 6 |
| 7 #include "ash/common/focus_cycler.h" | 7 #include "ash/common/focus_cycler.h" |
| 8 #include "ash/common/system/status_area_widget_delegate.h" | 8 #include "ash/common/system/status_area_widget_delegate.h" |
| 9 #include "ash/common/system/tray/system_tray.h" | 9 #include "ash/common/system/tray/system_tray.h" |
| 10 #include "ash/common/wm_shell.h" | 10 #include "ash/common/wm_shell.h" |
| 11 #include "ash/shell.h" | 11 #include "ash/shell.h" |
| 12 #include "base/bind.h" | 12 #include "base/bind.h" |
| 13 #include "base/callback.h" | 13 #include "base/callback.h" |
| 14 #include "base/i18n/rtl.h" | 14 #include "base/i18n/rtl.h" |
| 15 #include "base/logging.h" | 15 #include "base/logging.h" |
| 16 #include "base/macros.h" | 16 #include "base/macros.h" |
| 17 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
| 18 #include "base/trace_event/trace_event.h" | 18 #include "base/trace_event/trace_event.h" |
| 19 #include "base/values.h" | 19 #include "base/values.h" |
| 20 #include "chrome/browser/chrome_notification_types.h" | 20 #include "chrome/browser/chrome_notification_types.h" |
| 21 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" | 21 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" |
| 22 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" | 22 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" |
| 23 #include "chrome/browser/chromeos/login/ui/proxy_settings_dialog.h" | 23 #include "chrome/browser/chromeos/login/ui/proxy_settings_dialog.h" |
| 24 #include "chrome/browser/chromeos/login/ui/web_contents_set_background_color.h" |
| 24 #include "chrome/browser/chromeos/login/ui/webui_login_display.h" | 25 #include "chrome/browser/chromeos/login/ui/webui_login_display.h" |
| 25 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 26 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 26 #include "chrome/browser/chromeos/settings/cros_settings.h" | 27 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 27 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h" | 28 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h" |
| 28 #include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h" | 29 #include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h" |
| 29 #include "chrome/browser/media/webrtc/media_stream_devices_controller.h" | 30 #include "chrome/browser/media/webrtc/media_stream_devices_controller.h" |
| 30 #include "chrome/browser/password_manager/chrome_password_manager_client.h" | 31 #include "chrome/browser/password_manager/chrome_password_manager_client.h" |
| 31 #include "chrome/browser/renderer_preferences_util.h" | 32 #include "chrome/browser/renderer_preferences_util.h" |
| 32 #include "chrome/browser/sessions/session_tab_helper.h" | 33 #include "chrome/browser/sessions/session_tab_helper.h" |
| 33 #include "chrome/browser/ui/ash/ash_util.h" | 34 #include "chrome/browser/ui/ash/ash_util.h" |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 } | 345 } |
| 345 | 346 |
| 346 gfx::NativeWindow WebUILoginView::GetNativeWindow() const { | 347 gfx::NativeWindow WebUILoginView::GetNativeWindow() const { |
| 347 return GetWidget()->GetNativeWindow(); | 348 return GetWidget()->GetNativeWindow(); |
| 348 } | 349 } |
| 349 | 350 |
| 350 void WebUILoginView::LoadURL(const GURL & url) { | 351 void WebUILoginView::LoadURL(const GURL & url) { |
| 351 webui_login_->LoadInitialURL(url); | 352 webui_login_->LoadInitialURL(url); |
| 352 webui_login_->RequestFocus(); | 353 webui_login_->RequestFocus(); |
| 353 | 354 |
| 354 // TODO(nkostylev): Use WebContentsObserver::RenderViewCreated to track | 355 WebContentsSetBackgroundColor::CreateForWebContentsWithColor( |
| 355 // when RenderView is created. | 356 GetWebContents(), SK_ColorTRANSPARENT); |
| 356 GetWebContents() | |
| 357 ->GetRenderViewHost() | |
| 358 ->GetWidget() | |
| 359 ->GetView() | |
| 360 ->SetBackgroundColor(SK_ColorTRANSPARENT); | |
| 361 | 357 |
| 362 // There is no Shell instance while running in mash. | 358 // There is no Shell instance while running in mash. |
| 363 if (chrome::IsRunningInMash()) | 359 if (chrome::IsRunningInMash()) |
| 364 return; | 360 return; |
| 365 | 361 |
| 366 ash::StatusAreaWidgetDelegate* status_area_widget_delegate = | 362 ash::StatusAreaWidgetDelegate* status_area_widget_delegate = |
| 367 GetStatusAreaWidgetDelegate(); | 363 GetStatusAreaWidgetDelegate(); |
| 368 DCHECK(status_area_widget_delegate); | 364 DCHECK(status_area_widget_delegate); |
| 369 cycle_focus_traversable_.reset(new CycleFocusTraversable(this)); | 365 cycle_focus_traversable_.reset(new CycleFocusTraversable(this)); |
| 370 status_area_focus_traversable_.reset( | 366 status_area_focus_traversable_.reset( |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 613 if (should_emit_login_prompt_visible_) { | 609 if (should_emit_login_prompt_visible_) { |
| 614 VLOG(1) << "Login WebUI >> login-prompt-visible"; | 610 VLOG(1) << "Login WebUI >> login-prompt-visible"; |
| 615 chromeos::DBusThreadManager::Get()->GetSessionManagerClient()-> | 611 chromeos::DBusThreadManager::Get()->GetSessionManagerClient()-> |
| 616 EmitLoginPromptVisible(); | 612 EmitLoginPromptVisible(); |
| 617 } | 613 } |
| 618 | 614 |
| 619 webui_visible_ = true; | 615 webui_visible_ = true; |
| 620 } | 616 } |
| 621 | 617 |
| 622 } // namespace chromeos | 618 } // namespace chromeos |
| OLD | NEW |