| 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_display_host.h" | 5 #include "chrome/browser/chromeos/login/webui_login_display_host.h" |
| 6 | 6 |
| 7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
| 8 #include "ash/desktop_background/user_wallpaper_delegate.h" | 8 #include "ash/desktop_background/user_wallpaper_delegate.h" |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "ash/shell_window_ids.h" | 10 #include "ash/shell_window_ids.h" |
| 11 #include "ash/wm/window_animations.h" | 11 #include "ash/wm/window_animations.h" |
| 12 #include "ash/wm/window_properties.h" | 12 #include "ash/wm/window_properties.h" |
| 13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
| 14 #include "base/logging.h" | 14 #include "base/logging.h" |
| 15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 16 #include "base/time.h" | 16 #include "base/time.h" |
| 17 #include "base/values.h" | 17 #include "base/values.h" |
| 18 #include "chrome/browser/browser_shutdown.h" | 18 #include "chrome/browser/browser_shutdown.h" |
| 19 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" | 19 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" |
| 20 #include "chrome/browser/chromeos/login/oobe_display.h" | 20 #include "chrome/browser/chromeos/login/oobe_display.h" |
| 21 #include "chrome/browser/chromeos/login/webui_login_display.h" | 21 #include "chrome/browser/chromeos/login/webui_login_display.h" |
| 22 #include "chrome/browser/chromeos/login/webui_login_view.h" | 22 #include "chrome/browser/chromeos/login/webui_login_view.h" |
| 23 #include "chrome/browser/chromeos/login/wizard_controller.h" | 23 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 24 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" | 24 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" |
| 25 #include "chrome/common/chrome_notification_types.h" | 25 #include "chrome/common/chrome_notification_types.h" |
| 26 #include "chrome/common/chrome_switches.h" | 26 #include "chrome/common/chrome_switches.h" |
| 27 #include "content/public/browser/notification_service.h" | 27 #include "content/public/browser/notification_service.h" |
| 28 #include "content/public/browser/web_contents.h" | 28 #include "content/public/browser/web_contents.h" |
| 29 #include "content/public/browser/web_contents_view.h" |
| 29 #include "content/public/browser/web_ui.h" | 30 #include "content/public/browser/web_ui.h" |
| 30 #include "ui/aura/env.h" | 31 #include "ui/aura/env.h" |
| 31 #include "ui/aura/root_window.h" | 32 #include "ui/aura/root_window.h" |
| 32 #include "ui/aura/window.h" | 33 #include "ui/aura/window.h" |
| 33 #include "ui/views/widget/widget.h" | 34 #include "ui/views/widget/widget.h" |
| 34 | 35 |
| 35 namespace chromeos { | 36 namespace chromeos { |
| 36 | 37 |
| 37 namespace { | 38 namespace { |
| 38 | 39 |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 return new WizardController(this, oobe_display); | 316 return new WizardController(this, oobe_display); |
| 316 } | 317 } |
| 317 | 318 |
| 318 void WebUILoginDisplayHost::ShowWebUI() { | 319 void WebUILoginDisplayHost::ShowWebUI() { |
| 319 if (!login_window_ || !login_view_) { | 320 if (!login_window_ || !login_view_) { |
| 320 NOTREACHED(); | 321 NOTREACHED(); |
| 321 return; | 322 return; |
| 322 } | 323 } |
| 323 LOG(INFO) << "Login WebUI >> Show already initialized UI"; | 324 LOG(INFO) << "Login WebUI >> Show already initialized UI"; |
| 324 login_window_->Show(); | 325 login_window_->Show(); |
| 325 login_view_->GetWebContents()->Focus(); | 326 login_view_->GetWebContents()->GetView()->Focus(); |
| 326 login_view_->SetStatusAreaVisible(status_area_saved_visibility_); | 327 login_view_->SetStatusAreaVisible(status_area_saved_visibility_); |
| 327 login_view_->OnPostponedShow(); | 328 login_view_->OnPostponedShow(); |
| 328 // We should reset this flag to allow changing of status area visibility. | 329 // We should reset this flag to allow changing of status area visibility. |
| 329 initialize_webui_hidden_ = false; | 330 initialize_webui_hidden_ = false; |
| 330 } | 331 } |
| 331 | 332 |
| 332 void WebUILoginDisplayHost::StartPostponedWebUI() { | 333 void WebUILoginDisplayHost::StartPostponedWebUI() { |
| 333 if (!is_wallpaper_loaded_) { | 334 if (!is_wallpaper_loaded_) { |
| 334 NOTREACHED(); | 335 NOTREACHED(); |
| 335 return; | 336 return; |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 root->SetProperty(ash::internal::kIgnoreSoloWindowFramePainterPolicy, | 423 root->SetProperty(ash::internal::kIgnoreSoloWindowFramePainterPolicy, |
| 423 old_ignore_solo_window_frame_painter_policy_value_); | 424 old_ignore_solo_window_frame_painter_policy_value_); |
| 424 } | 425 } |
| 425 } | 426 } |
| 426 login_window_->Close(); | 427 login_window_->Close(); |
| 427 login_window_ = NULL; | 428 login_window_ = NULL; |
| 428 login_view_ = NULL; | 429 login_view_ = NULL; |
| 429 } | 430 } |
| 430 | 431 |
| 431 } // namespace chromeos | 432 } // namespace chromeos |
| OLD | NEW |