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

Side by Side Diff: views/desktop/desktop_window_view.h

Issue 8402002: Reenable triggering of screen rotations by sensors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Gardening Created 9 years, 1 month 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
« no previous file with comments | « ui/gfx/compositor/screen_rotation.cc ('k') | views/desktop/desktop_window_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #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
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_
OLDNEW
« no previous file with comments | « ui/gfx/compositor/screen_rotation.cc ('k') | views/desktop/desktop_window_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698