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 #ifndef VIEWS_DESKTOP_DESKTOP_WINDOW_VIEW_H_ | 5 #ifndef VIEWS_DESKTOP_DESKTOP_WINDOW_VIEW_H_ |
6 #define VIEWS_DESKTOP_DESKTOP_WINDOW_VIEW_H_ | 6 #define VIEWS_DESKTOP_DESKTOP_WINDOW_VIEW_H_ |
7 | 7 |
8 #include "base/observer_list.h" | 8 #include "base/observer_list.h" |
| 9 #include "ui/gfx/compositor/layer_animation_observer.h" |
9 #include "views/view.h" | 10 #include "views/view.h" |
10 #include "views/widget/widget_delegate.h" | 11 #include "views/widget/widget_delegate.h" |
11 | 12 |
| 13 namespace ui { |
| 14 class LayerAnimationSequence; |
| 15 } // namespace ui |
| 16 |
12 namespace views { | 17 namespace views { |
13 class NativeWidgetViews; | 18 class NativeWidgetViews; |
14 class Widget; | 19 class Widget; |
15 | 20 |
16 namespace desktop { | 21 namespace desktop { |
17 | 22 |
18 class DesktopWindowView : public WidgetDelegateView { | 23 class DesktopWindowView : public WidgetDelegateView, |
| 24 public ui::LayerAnimationObserver { |
19 public: | 25 public: |
20 // Observers can listen to various events on the desktop. | 26 // Observers can listen to various events on the desktop. |
21 class Observer { | 27 class Observer { |
22 public: | 28 public: |
23 virtual void OnDesktopBoundsChanged(const gfx::Rect& previous_bounds) = 0; | 29 virtual void OnDesktopBoundsChanged(const gfx::Rect& previous_bounds) = 0; |
24 | 30 |
25 protected: | 31 protected: |
26 virtual ~Observer() {} | 32 virtual ~Observer() {} |
27 }; | 33 }; |
28 | 34 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 virtual bool CanResize() const OVERRIDE; | 72 virtual bool CanResize() const OVERRIDE; |
67 virtual bool CanMaximize() const OVERRIDE; | 73 virtual bool CanMaximize() const OVERRIDE; |
68 virtual string16 GetWindowTitle() const OVERRIDE; | 74 virtual string16 GetWindowTitle() const OVERRIDE; |
69 virtual SkBitmap GetWindowAppIcon() OVERRIDE; | 75 virtual SkBitmap GetWindowAppIcon() OVERRIDE; |
70 virtual SkBitmap GetWindowIcon() OVERRIDE; | 76 virtual SkBitmap GetWindowIcon() OVERRIDE; |
71 virtual bool ShouldShowWindowIcon() const OVERRIDE; | 77 virtual bool ShouldShowWindowIcon() const OVERRIDE; |
72 virtual void WindowClosing() OVERRIDE; | 78 virtual void WindowClosing() OVERRIDE; |
73 virtual View* GetContentsView() OVERRIDE; | 79 virtual View* GetContentsView() OVERRIDE; |
74 virtual NonClientFrameView* CreateNonClientFrameView() OVERRIDE; | 80 virtual NonClientFrameView* CreateNonClientFrameView() OVERRIDE; |
75 | 81 |
| 82 // Implementation of ui::LayerAnimationObserver: |
| 83 virtual void OnLayerAnimationEnded( |
| 84 const ui::LayerAnimationSequence* animation) OVERRIDE; |
| 85 virtual void OnLayerAnimationScheduled( |
| 86 const ui::LayerAnimationSequence* animation) OVERRIDE; |
| 87 virtual void OnLayerAnimationAborted( |
| 88 const ui::LayerAnimationSequence* animation) OVERRIDE; |
| 89 |
76 ObserverList<Observer> observers_; | 90 ObserverList<Observer> observers_; |
77 DesktopType type_; | 91 DesktopType type_; |
78 Widget* widget_; | 92 Widget* widget_; |
79 | 93 |
80 DISALLOW_COPY_AND_ASSIGN(DesktopWindowView); | 94 DISALLOW_COPY_AND_ASSIGN(DesktopWindowView); |
81 }; | 95 }; |
82 | 96 |
83 } // namespace desktop | 97 } // namespace desktop |
84 } // namespace views | 98 } // namespace views |
85 | 99 |
86 #endif // VIEWS_DESKTOP_DESKTOP_WINDOW_VIEW_H_ | 100 #endif // VIEWS_DESKTOP_DESKTOP_WINDOW_VIEW_H_ |
OLD | NEW |