| 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 } | 162 } |
| 163 } | 163 } |
| 164 | 164 |
| 165 // static | 165 // static |
| 166 views::Widget* BackgroundView::CreateWindowContainingView( | 166 views::Widget* BackgroundView::CreateWindowContainingView( |
| 167 const gfx::Rect& bounds, | 167 const gfx::Rect& bounds, |
| 168 const GURL& background_url, | 168 const GURL& background_url, |
| 169 BackgroundView** view) { | 169 BackgroundView** view) { |
| 170 ResetXCursor(); | 170 ResetXCursor(); |
| 171 | 171 |
| 172 Widget* window = Widget::CreateWidget( | 172 Widget* window = Widget::CreateWidget(); |
| 173 Widget::CreateParams(Widget::CreateParams::TYPE_WINDOW)); | 173 Widget::CreateParams params(Widget::CreateParams::TYPE_WINDOW); |
| 174 window->Init(NULL, bounds); | 174 params.bounds = bounds; |
| 175 window->Init(params); |
| 175 *view = new BackgroundView(); | 176 *view = new BackgroundView(); |
| 176 (*view)->Init(background_url); | 177 (*view)->Init(background_url); |
| 177 | 178 |
| 178 if ((*view)->ScreenSaverEnabled()) | 179 if ((*view)->ScreenSaverEnabled()) |
| 179 (*view)->ShowScreenSaver(); | 180 (*view)->ShowScreenSaver(); |
| 180 | 181 |
| 181 window->SetContentsView(*view); | 182 window->SetContentsView(*view); |
| 182 | 183 |
| 183 (*view)->UpdateWindowType(); | 184 (*view)->UpdateWindowType(); |
| 184 | 185 |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 boot_times_label_->SetText(ASCIIToWide(boot_times_text)); | 555 boot_times_label_->SetText(ASCIIToWide(boot_times_text)); |
| 555 } | 556 } |
| 556 | 557 |
| 557 void BackgroundView::OnPolicyStateChanged( | 558 void BackgroundView::OnPolicyStateChanged( |
| 558 policy::CloudPolicySubsystem::PolicySubsystemState state, | 559 policy::CloudPolicySubsystem::PolicySubsystemState state, |
| 559 policy::CloudPolicySubsystem::ErrorDetails error_details) { | 560 policy::CloudPolicySubsystem::ErrorDetails error_details) { |
| 560 UpdateEnterpriseInfo(); | 561 UpdateEnterpriseInfo(); |
| 561 } | 562 } |
| 562 | 563 |
| 563 } // namespace chromeos | 564 } // namespace chromeos |
| OLD | NEW |