OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/account_screen.h" | 5 #include "chrome/browser/chromeos/login/account_screen.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "chrome/browser/chromeos/login/account_creation_view.h" | 9 #include "chrome/browser/chromeos/login/account_creation_view.h" |
10 #include "chrome/browser/chromeos/login/screen_observer.h" | 10 #include "chrome/browser/chromeos/login/screen_observer.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 AccountScreen::~AccountScreen() { | 69 AccountScreen::~AccountScreen() { |
70 } | 70 } |
71 | 71 |
72 /////////////////////////////////////////////////////////////////////////////// | 72 /////////////////////////////////////////////////////////////////////////////// |
73 // AccountScreen, ViewScreen implementation: | 73 // AccountScreen, ViewScreen implementation: |
74 void AccountScreen::CreateView() { | 74 void AccountScreen::CreateView() { |
75 ViewScreen<AccountCreationView>::CreateView(); | 75 ViewScreen<AccountCreationView>::CreateView(); |
76 view()->SetAccountCreationViewDelegate(this); | 76 view()->SetAccountCreationViewDelegate(this); |
77 | 77 |
78 GURL url(kCreateAccountPageUrl); | 78 GURL url(kCreateAccountPageUrl); |
79 Profile* profile = ProfileManager::GetLoginWizardProfile(); | 79 Profile* profile = ProfileManager::GetDefaultProfile(); |
80 view()->InitDOM(profile, | 80 view()->InitDOM(profile, |
81 SiteInstance::CreateSiteInstanceForURL(profile, url)); | 81 SiteInstance::CreateSiteInstanceForURL(profile, url)); |
82 view()->SetTabContentsDelegate(this); | 82 view()->SetTabContentsDelegate(this); |
83 view()->LoadURL(url); | 83 view()->LoadURL(url); |
84 } | 84 } |
85 | 85 |
86 AccountCreationView* AccountScreen::AllocateView() { | 86 AccountCreationView* AccountScreen::AllocateView() { |
87 return new AccountCreationView(); | 87 return new AccountCreationView(); |
88 } | 88 } |
89 | 89 |
(...skipping 29 matching lines...) Expand all Loading... |
119 void AccountScreen::OnUserCreated(const std::string& username, | 119 void AccountScreen::OnUserCreated(const std::string& username, |
120 const std::string& password) { | 120 const std::string& password) { |
121 delegate()->GetObserver(this)->OnSetUserNamePassword(username, password); | 121 delegate()->GetObserver(this)->OnSetUserNamePassword(username, password); |
122 } | 122 } |
123 | 123 |
124 void AccountScreen::OnPageLoadFailed(const std::string& url) { | 124 void AccountScreen::OnPageLoadFailed(const std::string& url) { |
125 delegate()->GetObserver(this)->OnExit(ScreenObserver::CONNECTION_FAILED); | 125 delegate()->GetObserver(this)->OnExit(ScreenObserver::CONNECTION_FAILED); |
126 } | 126 } |
127 | 127 |
128 } // namespace chromeos | 128 } // namespace chromeos |
OLD | NEW |