Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(622)

Side by Side Diff: chrome/browser/chromeos/login/views_update_screen_actor.cc

Issue 7774009: [cros] check for updates in WebUI OOBE can be cancelled in dev builds. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Added OnActorDestroyed to UpdateScreen::Delegate. Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/views_update_screen_actor.h ('k') | chrome/browser/resources/chromeos/login/oobe.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698