OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ash/desktop_background/desktop_background_widget_controller.h" | 5 #include "ash/desktop_background/desktop_background_widget_controller.h" |
6 | 6 |
7 #include "ash/ash_export.h" | 7 #include "ash/ash_export.h" |
8 #include "ash/desktop_background/user_wallpaper_delegate.h" | 8 #include "ash/desktop_background/user_wallpaper_delegate.h" |
9 #include "ash/root_window_controller.h" | 9 #include "ash/root_window_controller.h" |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 } | 31 } |
32 | 32 |
33 virtual ~ShowWallpaperAnimationObserver() { | 33 virtual ~ShowWallpaperAnimationObserver() { |
34 StopObservingImplicitAnimations(); | 34 StopObservingImplicitAnimations(); |
35 if (desktop_widget_) | 35 if (desktop_widget_) |
36 desktop_widget_->RemoveObserver(this); | 36 desktop_widget_->RemoveObserver(this); |
37 } | 37 } |
38 | 38 |
39 private: | 39 private: |
40 // Overridden from ui::ImplicitAnimationObserver: | 40 // Overridden from ui::ImplicitAnimationObserver: |
41 virtual void OnImplicitAnimationsScheduled() OVERRIDE { | 41 virtual void OnImplicitAnimationsScheduled() override { |
42 if (is_initial_animation_) { | 42 if (is_initial_animation_) { |
43 root_window_controller_-> | 43 root_window_controller_-> |
44 HandleInitialDesktopBackgroundAnimationStarted(); | 44 HandleInitialDesktopBackgroundAnimationStarted(); |
45 } | 45 } |
46 } | 46 } |
47 | 47 |
48 virtual void OnImplicitAnimationsCompleted() OVERRIDE { | 48 virtual void OnImplicitAnimationsCompleted() override { |
49 root_window_controller_->OnWallpaperAnimationFinished(desktop_widget_); | 49 root_window_controller_->OnWallpaperAnimationFinished(desktop_widget_); |
50 delete this; | 50 delete this; |
51 } | 51 } |
52 | 52 |
53 // Overridden from views::WidgetObserver. | 53 // Overridden from views::WidgetObserver. |
54 virtual void OnWidgetDestroying(views::Widget* widget) OVERRIDE { | 54 virtual void OnWidgetDestroying(views::Widget* widget) override { |
55 delete this; | 55 delete this; |
56 } | 56 } |
57 | 57 |
58 RootWindowController* root_window_controller_; | 58 RootWindowController* root_window_controller_; |
59 views::Widget* desktop_widget_; | 59 views::Widget* desktop_widget_; |
60 | 60 |
61 // Is this object observing the initial brightness/grayscale animation? | 61 // Is this object observing the initial brightness/grayscale animation? |
62 const bool is_initial_animation_; | 62 const bool is_initial_animation_; |
63 | 63 |
64 DISALLOW_COPY_AND_ASSIGN(ShowWallpaperAnimationObserver); | 64 DISALLOW_COPY_AND_ASSIGN(ShowWallpaperAnimationObserver); |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 } | 137 } |
138 | 138 |
139 DesktopBackgroundWidgetController* AnimatingDesktopController::GetController( | 139 DesktopBackgroundWidgetController* AnimatingDesktopController::GetController( |
140 bool pass_ownership) { | 140 bool pass_ownership) { |
141 if (pass_ownership) | 141 if (pass_ownership) |
142 return controller_.release(); | 142 return controller_.release(); |
143 return controller_.get(); | 143 return controller_.get(); |
144 } | 144 } |
145 | 145 |
146 } // namespace ash | 146 } // namespace ash |
OLD | NEW |