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 26 matching lines...) Expand all Loading... |
109 | 110 |
110 // Overridden from AnimationDelegate: | 111 // Overridden from AnimationDelegate: |
111 virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE; | 112 virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE; |
112 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; | 113 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; |
113 | 114 |
114 void CreateDragWidget(); | 115 void CreateDragWidget(); |
115 void DestroyDragWidget(); | 116 void DestroyDragWidget(); |
116 void EndDrag(bool canceled); | 117 void EndDrag(bool canceled); |
117 void CleanupDragDrop(); | 118 void CleanupDragDrop(); |
118 | 119 |
| 120 void SetBoundsInternal(const gfx::Rect& bounds, bool animate); |
| 121 |
119 GdkRectangle GetTitlebarRectForDrawAttention() const; | 122 GdkRectangle GetTitlebarRectForDrawAttention() const; |
120 | 123 |
121 CHROMEGTK_CALLBACK_1(PanelBrowserWindowGtk, gboolean, | 124 CHROMEGTK_CALLBACK_1(PanelBrowserWindowGtk, gboolean, |
122 OnTitlebarButtonPressEvent, GdkEventButton*); | 125 OnTitlebarButtonPressEvent, GdkEventButton*); |
123 CHROMEGTK_CALLBACK_1(PanelBrowserWindowGtk, gboolean, | 126 CHROMEGTK_CALLBACK_1(PanelBrowserWindowGtk, gboolean, |
124 OnTitlebarButtonReleaseEvent, GdkEventButton*); | 127 OnTitlebarButtonReleaseEvent, GdkEventButton*); |
125 | 128 |
126 // drag-begin is emitted when the drag is started. We connect so that we can | 129 // drag-begin is emitted when the drag is started. We connect so that we can |
127 // set the drag icon to a transparent pixbuf. | 130 // set the drag icon to a transparent pixbuf. |
128 CHROMEGTK_CALLBACK_1(PanelBrowserWindowGtk, void, OnDragBegin, | 131 CHROMEGTK_CALLBACK_1(PanelBrowserWindowGtk, void, OnDragBegin, |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 base::Time disableMinimizeUntilTime_; | 185 base::Time disableMinimizeUntilTime_; |
183 | 186 |
184 // Used to animate the bounds change. | 187 // Used to animate the bounds change. |
185 scoped_ptr<ui::SlideAnimation> bounds_animator_; | 188 scoped_ptr<ui::SlideAnimation> bounds_animator_; |
186 gfx::Rect animation_start_bounds_; | 189 gfx::Rect animation_start_bounds_; |
187 | 190 |
188 DISALLOW_COPY_AND_ASSIGN(PanelBrowserWindowGtk); | 191 DISALLOW_COPY_AND_ASSIGN(PanelBrowserWindowGtk); |
189 }; | 192 }; |
190 | 193 |
191 #endif // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_GTK_H_ | 194 #endif // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_GTK_H_ |
OLD | NEW |