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

Side by Side Diff: chrome/browser/ui/views/panels/panel_stack_view.h

Issue 23531053: ui/base/animation -> ui/gfx/animation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge 2 trunk Created 7 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 CHROME_BROWSER_UI_VIEWS_PANELS_PANEL_STACK_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_PANELS_PANEL_STACK_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_PANELS_PANEL_STACK_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_PANELS_PANEL_STACK_VIEW_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "chrome/browser/ui/panels/native_panel_stack_window.h" 12 #include "chrome/browser/ui/panels/native_panel_stack_window.h"
13 #include "ui/base/animation/animation_delegate.h" 13 #include "ui/gfx/animation/animation_delegate.h"
14 #include "ui/views/focus/widget_focus_manager.h" 14 #include "ui/views/focus/widget_focus_manager.h"
15 #include "ui/views/widget/widget_delegate.h" 15 #include "ui/views/widget/widget_delegate.h"
16 #include "ui/views/widget/widget_observer.h" 16 #include "ui/views/widget/widget_observer.h"
17 17
18 #if defined(OS_WIN) 18 #if defined(OS_WIN)
19 #include "chrome/browser/ui/views/panels/taskbar_window_thumbnailer_win.h" 19 #include "chrome/browser/ui/views/panels/taskbar_window_thumbnailer_win.h"
20 #include "ui/base/win/hwnd_subclass.h" 20 #include "ui/base/win/hwnd_subclass.h"
21 #endif 21 #endif
22 22
23 namespace ui { 23 namespace gfx {
24 class LinearAnimation; 24 class LinearAnimation;
25 } 25 }
26 namespace views { 26 namespace views {
27 class Widget; 27 class Widget;
28 } 28 }
29 29
30 // A native window that acts as the owner of all panels in the stack, in order 30 // A native window that acts as the owner of all panels in the stack, in order
31 // to make all panels appear as a single window on the taskbar or launcher. 31 // to make all panels appear as a single window on the taskbar or launcher.
32 class PanelStackView : public NativePanelStackWindow, 32 class PanelStackView : public NativePanelStackWindow,
33 public views::WidgetObserver, 33 public views::WidgetObserver,
34 public views::WidgetDelegateView, 34 public views::WidgetDelegateView,
35 public views::WidgetFocusChangeListener, 35 public views::WidgetFocusChangeListener,
36 #if defined(OS_WIN) 36 #if defined(OS_WIN)
37 public ui::HWNDMessageFilter, 37 public ui::HWNDMessageFilter,
38 public TaskbarWindowThumbnailerDelegateWin, 38 public TaskbarWindowThumbnailerDelegateWin,
39 #endif 39 #endif
40 public ui::AnimationDelegate { 40 public gfx::AnimationDelegate {
41 public: 41 public:
42 explicit PanelStackView(NativePanelStackWindowDelegate* delegate); 42 explicit PanelStackView(NativePanelStackWindowDelegate* delegate);
43 virtual ~PanelStackView(); 43 virtual ~PanelStackView();
44 44
45 protected: 45 protected:
46 // Overridden from NativePanelStackWindow: 46 // Overridden from NativePanelStackWindow:
47 virtual void Close() OVERRIDE; 47 virtual void Close() OVERRIDE;
48 virtual void AddPanel(Panel* panel) OVERRIDE; 48 virtual void AddPanel(Panel* panel) OVERRIDE;
49 virtual void RemovePanel(Panel* panel) OVERRIDE; 49 virtual void RemovePanel(Panel* panel) OVERRIDE;
50 virtual void MergeWith(NativePanelStackWindow* another) OVERRIDE; 50 virtual void MergeWith(NativePanelStackWindow* another) OVERRIDE;
(...skipping 25 matching lines...) Expand all
76 virtual void DeleteDelegate() OVERRIDE; 76 virtual void DeleteDelegate() OVERRIDE;
77 77
78 // Overridden from views::WidgetObserver: 78 // Overridden from views::WidgetObserver:
79 virtual void OnWidgetDestroying(views::Widget* widget) OVERRIDE; 79 virtual void OnWidgetDestroying(views::Widget* widget) OVERRIDE;
80 80
81 // Overridden from views::WidgetFocusChangeListener: 81 // Overridden from views::WidgetFocusChangeListener:
82 virtual void OnNativeFocusChange(gfx::NativeView focused_before, 82 virtual void OnNativeFocusChange(gfx::NativeView focused_before,
83 gfx::NativeView focused_now) OVERRIDE; 83 gfx::NativeView focused_now) OVERRIDE;
84 84
85 // Overridden from AnimationDelegate: 85 // Overridden from AnimationDelegate:
86 virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE; 86 virtual void AnimationEnded(const gfx::Animation* animation) OVERRIDE;
87 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; 87 virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE;
88 88
89 // Updates the bounds of panels as specified in batch update data. 89 // Updates the bounds of panels as specified in batch update data.
90 void UpdatePanelsBounds(); 90 void UpdatePanelsBounds();
91 91
92 // Notifies the delegate that the updates of the panel bounds are completed. 92 // Notifies the delegate that the updates of the panel bounds are completed.
93 void NotifyBoundsUpdateCompleted(); 93 void NotifyBoundsUpdateCompleted();
94 94
95 // Computes/updates the minimum bounds that could fit all panels. 95 // Computes/updates the minimum bounds that could fit all panels.
96 gfx::Rect GetStackWindowBounds() const; 96 gfx::Rect GetStackWindowBounds() const;
97 void UpdateStackWindowBounds(); 97 void UpdateStackWindowBounds();
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 // a small window, like collapsed panel. 145 // a small window, like collapsed panel.
146 scoped_ptr<TaskbarWindowThumbnailerWin> thumbnailer_; 146 scoped_ptr<TaskbarWindowThumbnailerWin> thumbnailer_;
147 #endif 147 #endif
148 148
149 // For batch bounds update. 149 // For batch bounds update.
150 bool animate_bounds_updates_; 150 bool animate_bounds_updates_;
151 bool bounds_updates_started_; 151 bool bounds_updates_started_;
152 BoundsUpdates bounds_updates_; 152 BoundsUpdates bounds_updates_;
153 153
154 // Used to animate the bounds changes at a synchronized pace. 154 // Used to animate the bounds changes at a synchronized pace.
155 scoped_ptr<ui::LinearAnimation> bounds_animator_; 155 scoped_ptr<gfx::LinearAnimation> bounds_animator_;
156 156
157 DISALLOW_COPY_AND_ASSIGN(PanelStackView); 157 DISALLOW_COPY_AND_ASSIGN(PanelStackView);
158 }; 158 };
159 159
160 #endif // CHROME_BROWSER_UI_VIEWS_PANELS_PANEL_STACK_VIEW_H_ 160 #endif // CHROME_BROWSER_UI_VIEWS_PANELS_PANEL_STACK_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_result_view.cc ('k') | chrome/browser/ui/views/panels/panel_stack_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698