| 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 SchedulePaint(); | 122 SchedulePaint(); |
| 123 } | 123 } |
| 124 } | 124 } |
| 125 | 125 |
| 126 // static | 126 // static |
| 127 views::Widget* BackgroundView::CreateWindowContainingView( | 127 views::Widget* BackgroundView::CreateWindowContainingView( |
| 128 const gfx::Rect& bounds, | 128 const gfx::Rect& bounds, |
| 129 const GURL& background_url, | 129 const GURL& background_url, |
| 130 BackgroundView** view) { | 130 BackgroundView** view) { |
| 131 Widget* window = new Widget; | 131 Widget* window = new Widget; |
| 132 Widget::InitParams params(Widget::InitParams::TYPE_POPUP); | 132 Widget::InitParams params(Widget::InitParams::TYPE_WINDOW_FRAMELESS); |
| 133 params.bounds = bounds; | 133 params.bounds = bounds; |
| 134 window->Init(params); | 134 window->Init(params); |
| 135 *view = new BackgroundView(); | 135 *view = new BackgroundView(); |
| 136 (*view)->Init(background_url); | 136 (*view)->Init(background_url); |
| 137 | 137 |
| 138 if ((*view)->ScreenSaverEnabled()) | 138 if ((*view)->ScreenSaverEnabled()) |
| 139 (*view)->ShowScreenSaver(); | 139 (*view)->ShowScreenSaver(); |
| 140 | 140 |
| 141 window->SetContentsView(*view); | 141 window->SetContentsView(*view); |
| 142 | 142 |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 boot_times_label_->SetText(ASCIIToWide(boot_times_text)); | 519 boot_times_label_->SetText(ASCIIToWide(boot_times_text)); |
| 520 } | 520 } |
| 521 | 521 |
| 522 void BackgroundView::OnPolicyStateChanged( | 522 void BackgroundView::OnPolicyStateChanged( |
| 523 policy::CloudPolicySubsystem::PolicySubsystemState state, | 523 policy::CloudPolicySubsystem::PolicySubsystemState state, |
| 524 policy::CloudPolicySubsystem::ErrorDetails error_details) { | 524 policy::CloudPolicySubsystem::ErrorDetails error_details) { |
| 525 UpdateEnterpriseInfo(); | 525 UpdateEnterpriseInfo(); |
| 526 } | 526 } |
| 527 | 527 |
| 528 } // namespace chromeos | 528 } // namespace chromeos |
| OLD | NEW |