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

Side by Side Diff: chrome/browser/ui/panels/panel_browser_view.h

Issue 8775022: Add Panel::SetPanelBoundsInstantly for all platforms. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix per feedback Created 9 years 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) 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
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 19 matching lines...) Expand all
111 virtual void EnsurePanelFullyVisible() OVERRIDE; 112 virtual void EnsurePanelFullyVisible() OVERRIDE;
112 113
113 // Overridden from AnimationDelegate: 114 // Overridden from AnimationDelegate:
114 virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE; 115 virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE;
115 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; 116 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE;
116 117
117 bool EndDragging(bool cancelled); 118 bool EndDragging(bool cancelled);
118 119
119 void StopDrawingAttention(); 120 void StopDrawingAttention();
120 121
122 void SetBoundsInternal(const gfx::Rect& bounds, bool animate);
123
121 scoped_ptr<Panel> panel_; 124 scoped_ptr<Panel> panel_;
122 gfx::Rect bounds_; 125 gfx::Rect bounds_;
123 126
124 // Is the panel being closed? Do not use it when it is closed. 127 // Is the panel being closed? Do not use it when it is closed.
125 bool closed_; 128 bool closed_;
126 129
127 // Is the panel receiving the focus? 130 // Is the panel receiving the focus?
128 bool focused_; 131 bool focused_;
129 132
130 // Is the mouse button currently down? 133 // Is the mouse button currently down?
(...skipping 22 matching lines...) Expand all
153 base::TimeTicks attention_cleared_time_; 156 base::TimeTicks attention_cleared_time_;
154 157
155 // The last view that had focus in the panel. This is saved so that focus can 158 // The last view that had focus in the panel. This is saved so that focus can
156 // be restored properly when a drag ends. 159 // be restored properly when a drag ends.
157 views::View* old_focused_view_; 160 views::View* old_focused_view_;
158 161
159 DISALLOW_COPY_AND_ASSIGN(PanelBrowserView); 162 DISALLOW_COPY_AND_ASSIGN(PanelBrowserView);
160 }; 163 };
161 164
162 #endif // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_VIEW_H_ 165 #endif // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698