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_WINDOW_GTK_H_ | 5 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_GTK_H_ |
6 #define CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_GTK_H_ | 6 #define CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_GTK_H_ |
7 | 7 |
8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "chrome/browser/ui/gtk/browser_window_gtk.h" | 10 #include "chrome/browser/ui/gtk/browser_window_gtk.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 virtual void ActiveWindowChanged(GdkWindow* active_window) OVERRIDE; | 63 virtual void ActiveWindowChanged(GdkWindow* active_window) OVERRIDE; |
64 // 'focus-in-event' handler. | 64 // 'focus-in-event' handler. |
65 virtual void HandleFocusIn(GtkWidget* widget, | 65 virtual void HandleFocusIn(GtkWidget* widget, |
66 GdkEventFocus* event) OVERRIDE; | 66 GdkEventFocus* event) OVERRIDE; |
67 | 67 |
68 // Overridden from NativePanel: | 68 // Overridden from NativePanel: |
69 virtual void ShowPanel() OVERRIDE; | 69 virtual void ShowPanel() OVERRIDE; |
70 virtual void ShowPanelInactive() OVERRIDE; | 70 virtual void ShowPanelInactive() OVERRIDE; |
71 virtual gfx::Rect GetPanelBounds() const OVERRIDE; | 71 virtual gfx::Rect GetPanelBounds() const OVERRIDE; |
72 virtual void SetPanelBounds(const gfx::Rect& bounds) OVERRIDE; | 72 virtual void SetPanelBounds(const gfx::Rect& bounds) OVERRIDE; |
| 73 virtual void SetPanelBoundsInstantly(const gfx::Rect& bounds) OVERRIDE; |
73 virtual void ClosePanel() OVERRIDE; | 74 virtual void ClosePanel() OVERRIDE; |
74 virtual void ActivatePanel() OVERRIDE; | 75 virtual void ActivatePanel() OVERRIDE; |
75 virtual void DeactivatePanel() OVERRIDE; | 76 virtual void DeactivatePanel() OVERRIDE; |
76 virtual bool IsPanelActive() const OVERRIDE; | 77 virtual bool IsPanelActive() const OVERRIDE; |
77 virtual gfx::NativeWindow GetNativePanelHandle() OVERRIDE; | 78 virtual gfx::NativeWindow GetNativePanelHandle() OVERRIDE; |
78 virtual void UpdatePanelTitleBar() OVERRIDE; | 79 virtual void UpdatePanelTitleBar() OVERRIDE; |
79 virtual void UpdatePanelLoadingAnimations(bool should_animate) OVERRIDE; | 80 virtual void UpdatePanelLoadingAnimations(bool should_animate) OVERRIDE; |
80 virtual void ShowTaskManagerForPanel() OVERRIDE; | 81 virtual void ShowTaskManagerForPanel() OVERRIDE; |
81 virtual FindBar* CreatePanelFindBar() OVERRIDE; | 82 virtual FindBar* CreatePanelFindBar() OVERRIDE; |
82 virtual void NotifyPanelOnUserChangedTheme() OVERRIDE; | 83 virtual void NotifyPanelOnUserChangedTheme() OVERRIDE; |
(...skipping 28 matching lines...) Expand all Loading... |
111 | 112 |
112 // Overridden from AnimationDelegate: | 113 // Overridden from AnimationDelegate: |
113 virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE; | 114 virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE; |
114 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; | 115 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; |
115 | 116 |
116 void CreateDragWidget(); | 117 void CreateDragWidget(); |
117 void DestroyDragWidget(); | 118 void DestroyDragWidget(); |
118 void EndDrag(bool canceled); | 119 void EndDrag(bool canceled); |
119 void CleanupDragDrop(); | 120 void CleanupDragDrop(); |
120 | 121 |
| 122 void SetBoundsInternal(const gfx::Rect& bounds, bool animate); |
| 123 |
121 GdkRectangle GetTitlebarRectForDrawAttention() const; | 124 GdkRectangle GetTitlebarRectForDrawAttention() const; |
122 | 125 |
123 CHROMEGTK_CALLBACK_1(PanelBrowserWindowGtk, gboolean, | 126 CHROMEGTK_CALLBACK_1(PanelBrowserWindowGtk, gboolean, |
124 OnTitlebarButtonPressEvent, GdkEventButton*); | 127 OnTitlebarButtonPressEvent, GdkEventButton*); |
125 CHROMEGTK_CALLBACK_1(PanelBrowserWindowGtk, gboolean, | 128 CHROMEGTK_CALLBACK_1(PanelBrowserWindowGtk, gboolean, |
126 OnTitlebarButtonReleaseEvent, GdkEventButton*); | 129 OnTitlebarButtonReleaseEvent, GdkEventButton*); |
127 | 130 |
128 // drag-begin is emitted when the drag is started. We connect so that we can | 131 // drag-begin is emitted when the drag is started. We connect so that we can |
129 // set the drag icon to a transparent pixbuf. | 132 // set the drag icon to a transparent pixbuf. |
130 CHROMEGTK_CALLBACK_1(PanelBrowserWindowGtk, void, OnDragBegin, | 133 CHROMEGTK_CALLBACK_1(PanelBrowserWindowGtk, void, OnDragBegin, |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 base::Time disableMinimizeUntilTime_; | 187 base::Time disableMinimizeUntilTime_; |
185 | 188 |
186 // Used to animate the bounds change. | 189 // Used to animate the bounds change. |
187 scoped_ptr<ui::SlideAnimation> bounds_animator_; | 190 scoped_ptr<ui::SlideAnimation> bounds_animator_; |
188 gfx::Rect animation_start_bounds_; | 191 gfx::Rect animation_start_bounds_; |
189 | 192 |
190 DISALLOW_COPY_AND_ASSIGN(PanelBrowserWindowGtk); | 193 DISALLOW_COPY_AND_ASSIGN(PanelBrowserWindowGtk); |
191 }; | 194 }; |
192 | 195 |
193 #endif // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_GTK_H_ | 196 #endif // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_GTK_H_ |
OLD | NEW |