OLD | NEW |
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/background_view.h" | 5 #include "chrome/browser/chromeos/login/background_view.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/string16.h" | 10 #include "base/string16.h" |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 } | 136 } |
137 } | 137 } |
138 | 138 |
139 // static | 139 // static |
140 views::Widget* BackgroundView::CreateWindowContainingView( | 140 views::Widget* BackgroundView::CreateWindowContainingView( |
141 const gfx::Rect& bounds, | 141 const gfx::Rect& bounds, |
142 const GURL& background_url, | 142 const GURL& background_url, |
143 BackgroundView** view) { | 143 BackgroundView** view) { |
144 ResetXCursor(); | 144 ResetXCursor(); |
145 | 145 |
146 Widget* window = Widget::CreateWidget(); | 146 Widget* window = new Widget; |
147 Widget::InitParams params(Widget::InitParams::TYPE_WINDOW); | 147 Widget::InitParams params(Widget::InitParams::TYPE_WINDOW); |
148 params.bounds = bounds; | 148 params.bounds = bounds; |
149 window->Init(params); | 149 window->Init(params); |
150 *view = new BackgroundView(); | 150 *view = new BackgroundView(); |
151 (*view)->Init(background_url); | 151 (*view)->Init(background_url); |
152 | 152 |
153 if ((*view)->ScreenSaverEnabled()) | 153 if ((*view)->ScreenSaverEnabled()) |
154 (*view)->ShowScreenSaver(); | 154 (*view)->ShowScreenSaver(); |
155 | 155 |
156 window->SetContentsView(*view); | 156 window->SetContentsView(*view); |
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
532 boot_times_label_->SetText(ASCIIToWide(boot_times_text)); | 532 boot_times_label_->SetText(ASCIIToWide(boot_times_text)); |
533 } | 533 } |
534 | 534 |
535 void BackgroundView::OnPolicyStateChanged( | 535 void BackgroundView::OnPolicyStateChanged( |
536 policy::CloudPolicySubsystem::PolicySubsystemState state, | 536 policy::CloudPolicySubsystem::PolicySubsystemState state, |
537 policy::CloudPolicySubsystem::ErrorDetails error_details) { | 537 policy::CloudPolicySubsystem::ErrorDetails error_details) { |
538 UpdateEnterpriseInfo(); | 538 UpdateEnterpriseInfo(); |
539 } | 539 } |
540 | 540 |
541 } // namespace chromeos | 541 } // namespace chromeos |
OLD | NEW |