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/views_update_screen_actor.h" | 5 #include "chrome/browser/chromeos/login/views_update_screen_actor.h" |
6 | 6 |
7 namespace { | 7 namespace { |
8 | 8 |
9 // Considering 10px shadow from each side. | 9 // Considering 10px shadow from each side. |
10 const int kUpdateScreenWidth = 580; | 10 const int kUpdateScreenWidth = 580; |
11 const int kUpdateScreenHeight = 305; | 11 const int kUpdateScreenHeight = 305; |
12 | 12 |
13 } // namespace | 13 } // namespace |
14 | 14 |
15 namespace chromeos { | 15 namespace chromeos { |
16 | 16 |
17 ViewsUpdateScreenActor::ViewsUpdateScreenActor(ViewScreenDelegate* delegate) | 17 ViewsUpdateScreenActor::ViewsUpdateScreenActor(ViewScreenDelegate* delegate) |
18 : DefaultViewScreen<chromeos::UpdateView>(delegate, | 18 : DefaultViewScreen<chromeos::UpdateView>(delegate, |
19 kUpdateScreenWidth, | 19 kUpdateScreenWidth, |
20 kUpdateScreenHeight) { | 20 kUpdateScreenHeight), |
| 21 screen_(NULL) { |
| 22 } |
| 23 |
| 24 ViewsUpdateScreenActor::~ViewsUpdateScreenActor() { |
| 25 if (screen_) |
| 26 screen_->OnActorDestroyed(this); |
| 27 } |
| 28 |
| 29 void ViewsUpdateScreenActor::SetDelegate(UpdateScreenActor::Delegate* screen) { |
| 30 screen_ = screen; |
21 } | 31 } |
22 | 32 |
23 void ViewsUpdateScreenActor::PrepareToShow() { | 33 void ViewsUpdateScreenActor::PrepareToShow() { |
24 DefaultViewScreen<chromeos::UpdateView>::PrepareToShow(); | 34 DefaultViewScreen<chromeos::UpdateView>::PrepareToShow(); |
25 } | 35 } |
26 | 36 |
27 void ViewsUpdateScreenActor::Show() { | 37 void ViewsUpdateScreenActor::Show() { |
28 DefaultViewScreen<chromeos::UpdateView>::Show(); | 38 DefaultViewScreen<chromeos::UpdateView>::Show(); |
29 } | 39 } |
30 | 40 |
(...skipping 11 matching lines...) Expand all Loading... |
42 | 52 |
43 void ViewsUpdateScreenActor::ShowCurtain(bool enable) { | 53 void ViewsUpdateScreenActor::ShowCurtain(bool enable) { |
44 view()->ShowCurtain(enable); | 54 view()->ShowCurtain(enable); |
45 } | 55 } |
46 | 56 |
47 void ViewsUpdateScreenActor::ShowPreparingUpdatesInfo(bool visible) { | 57 void ViewsUpdateScreenActor::ShowPreparingUpdatesInfo(bool visible) { |
48 view()->ShowPreparingUpdatesInfo(visible); | 58 view()->ShowPreparingUpdatesInfo(visible); |
49 } | 59 } |
50 | 60 |
51 } // namespace chromeos | 61 } // namespace chromeos |
OLD | NEW |