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

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

Issue 8395042: [cros,de-hack] Get rid of singleton for the WebUILoginScreen. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: comment nit Created 9 years, 1 month 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
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/views_login_display_host.h" 5 #include "chrome/browser/chromeos/login/views_login_display_host.h"
6 6
7 #include "chrome/browser/chromeos/login/views_login_display.h" 7 #include "chrome/browser/chromeos/login/views_login_display.h"
8 #include "chrome/browser/chromeos/login/views_oobe_display.h"
8 #include "chrome/browser/chromeos/login/wizard_accessibility_helper.h" 9 #include "chrome/browser/chromeos/login/wizard_accessibility_helper.h"
10 #include "chrome/browser/chromeos/login/wizard_controller.h"
11
9 12
10 namespace chromeos { 13 namespace chromeos {
11 14
12 // ViewsLoginDisplayHost ------------------------------------------------------- 15 // ViewsLoginDisplayHost -------------------------------------------------------
13 16
14 ViewsLoginDisplayHost::ViewsLoginDisplayHost(const gfx::Rect& background_bounds) 17 ViewsLoginDisplayHost::ViewsLoginDisplayHost(const gfx::Rect& background_bounds)
15 : BaseLoginDisplayHost(background_bounds), 18 : BaseLoginDisplayHost(background_bounds),
16 background_view_(NULL), 19 background_view_(NULL),
17 background_window_(NULL) { 20 background_window_(NULL) {
18 } 21 }
19 22
20 ViewsLoginDisplayHost::~ViewsLoginDisplayHost() { 23 ViewsLoginDisplayHost::~ViewsLoginDisplayHost() {
21 if (background_window_) 24 if (background_window_)
22 background_window_->Close(); 25 background_window_->Close();
23 } 26 }
24 27
25 // LoginDisplayHost implementation ----------------------------------------- 28 // LoginDisplayHost implementation -----------------------------------------
26 29
27 LoginDisplay* ViewsLoginDisplayHost::CreateLoginDisplay( 30 LoginDisplay* ViewsLoginDisplayHost::CreateLoginDisplay(
28 LoginDisplay::Delegate* delegate) const { 31 LoginDisplay::Delegate* delegate) {
29 chromeos::WizardAccessibilityHelper::GetInstance()->Init(); 32 chromeos::WizardAccessibilityHelper::GetInstance()->Init();
30 return new ViewsLoginDisplay(delegate, background_bounds()); 33 return new ViewsLoginDisplay(delegate, background_bounds());
31 } 34 }
32 35
33 gfx::NativeWindow ViewsLoginDisplayHost::GetNativeWindow() const { 36 gfx::NativeWindow ViewsLoginDisplayHost::GetNativeWindow() const {
34 if (background_view_) 37 if (background_view_)
35 return background_view_->GetNativeWindow(); 38 return background_view_->GetNativeWindow();
36 else 39 else
37 return NULL; 40 return NULL;
38 } 41 }
(...skipping 28 matching lines...) Expand all
67 background_window_->Show(); 70 background_window_->Show();
68 return; 71 return;
69 } 72 }
70 background_window_ = 73 background_window_ =
71 BackgroundView::CreateWindowContainingView(background_bounds(), 74 BackgroundView::CreateWindowContainingView(background_bounds(),
72 GURL(), 75 GURL(),
73 &background_view_); 76 &background_view_);
74 background_window_->Show(); 77 background_window_->Show();
75 } 78 }
76 79
80 void ViewsLoginDisplayHost::StartSignInScreen() {
81 oobe_display_.reset();
82 BaseLoginDisplayHost::StartSignInScreen();
83 }
84
85 WizardController* ViewsLoginDisplayHost::CreateWizardController() {
86 oobe_display_.reset(new ViewsOobeDisplay(background_bounds()));
87 WizardController* wizard_controller =
88 new WizardController(this, oobe_display_.get());
89 oobe_display_->SetScreenObserver(wizard_controller);
90 return wizard_controller;
91 }
92
77 } // namespace chromeos 93 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/views_login_display_host.h ('k') | chrome/browser/chromeos/login/webui_login_display.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698