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 CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_VIEW_H_ |
6 #define CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_VIEW_H_ | 6 #define CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_VIEW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/gtest_prod_util.h" | 9 #include "base/gtest_prod_util.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 | 72 |
73 // Overridden from views::Widget::Observer | 73 // Overridden from views::Widget::Observer |
74 virtual void OnWidgetActivationChanged(views::Widget* widget, | 74 virtual void OnWidgetActivationChanged(views::Widget* widget, |
75 bool active) OVERRIDE; | 75 bool active) OVERRIDE; |
76 | 76 |
77 // Overridden from NativePanel: | 77 // Overridden from NativePanel: |
78 virtual void ShowPanel() OVERRIDE; | 78 virtual void ShowPanel() OVERRIDE; |
79 virtual void ShowPanelInactive() OVERRIDE; | 79 virtual void ShowPanelInactive() OVERRIDE; |
80 virtual gfx::Rect GetPanelBounds() const OVERRIDE; | 80 virtual gfx::Rect GetPanelBounds() const OVERRIDE; |
81 virtual void SetPanelBounds(const gfx::Rect& bounds) OVERRIDE; | 81 virtual void SetPanelBounds(const gfx::Rect& bounds) OVERRIDE; |
| 82 virtual void SetPanelBoundsInstantly(const gfx::Rect& bounds) OVERRIDE; |
82 virtual void ClosePanel() OVERRIDE; | 83 virtual void ClosePanel() OVERRIDE; |
83 virtual void ActivatePanel() OVERRIDE; | 84 virtual void ActivatePanel() OVERRIDE; |
84 virtual void DeactivatePanel() OVERRIDE; | 85 virtual void DeactivatePanel() OVERRIDE; |
85 virtual bool IsPanelActive() const OVERRIDE; | 86 virtual bool IsPanelActive() const OVERRIDE; |
86 virtual gfx::NativeWindow GetNativePanelHandle() OVERRIDE; | 87 virtual gfx::NativeWindow GetNativePanelHandle() OVERRIDE; |
87 virtual void UpdatePanelTitleBar() OVERRIDE; | 88 virtual void UpdatePanelTitleBar() OVERRIDE; |
88 virtual void UpdatePanelLoadingAnimations(bool should_animate) OVERRIDE; | 89 virtual void UpdatePanelLoadingAnimations(bool should_animate) OVERRIDE; |
89 virtual void ShowTaskManagerForPanel() OVERRIDE; | 90 virtual void ShowTaskManagerForPanel() OVERRIDE; |
90 virtual FindBar* CreatePanelFindBar() OVERRIDE; | 91 virtual FindBar* CreatePanelFindBar() OVERRIDE; |
91 virtual void NotifyPanelOnUserChangedTheme() OVERRIDE; | 92 virtual void NotifyPanelOnUserChangedTheme() OVERRIDE; |
(...skipping 17 matching lines...) Expand all Loading... |
109 virtual void DestroyPanelBrowser() OVERRIDE; | 110 virtual void DestroyPanelBrowser() OVERRIDE; |
110 | 111 |
111 // Overridden from AnimationDelegate: | 112 // Overridden from AnimationDelegate: |
112 virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE; | 113 virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE; |
113 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; | 114 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; |
114 | 115 |
115 bool EndDragging(bool cancelled); | 116 bool EndDragging(bool cancelled); |
116 | 117 |
117 void StopDrawingAttention(); | 118 void StopDrawingAttention(); |
118 | 119 |
| 120 void SetBoundsInternal(const gfx::Rect& bounds, bool animate); |
| 121 |
119 scoped_ptr<Panel> panel_; | 122 scoped_ptr<Panel> panel_; |
120 gfx::Rect bounds_; | 123 gfx::Rect bounds_; |
121 | 124 |
122 // Is the panel being closed? Do not use it when it is closed. | 125 // Is the panel being closed? Do not use it when it is closed. |
123 bool closed_; | 126 bool closed_; |
124 | 127 |
125 // Is the panel receiving the focus? | 128 // Is the panel receiving the focus? |
126 bool focused_; | 129 bool focused_; |
127 | 130 |
128 // Is the mouse button currently down? | 131 // Is the mouse button currently down? |
(...skipping 22 matching lines...) Expand all Loading... |
151 base::TimeTicks attention_cleared_time_; | 154 base::TimeTicks attention_cleared_time_; |
152 | 155 |
153 // The last view that had focus in the panel. This is saved so that focus can | 156 // The last view that had focus in the panel. This is saved so that focus can |
154 // be restored properly when a drag ends. | 157 // be restored properly when a drag ends. |
155 views::View* old_focused_view_; | 158 views::View* old_focused_view_; |
156 | 159 |
157 DISALLOW_COPY_AND_ASSIGN(PanelBrowserView); | 160 DISALLOW_COPY_AND_ASSIGN(PanelBrowserView); |
158 }; | 161 }; |
159 | 162 |
160 #endif // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_VIEW_H_ | 163 #endif // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_VIEW_H_ |
OLD | NEW |