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 #include "chrome/browser/ui/panels/panel_browser_window_gtk.h" | 5 #include "chrome/browser/ui/panels/panel_browser_window_gtk.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "chrome/browser/ui/browser_list.h" | 8 #include "chrome/browser/ui/browser_list.h" |
9 #include "chrome/browser/ui/panels/panel.h" | 9 #include "chrome/browser/ui/panels/panel.h" |
10 #include "chrome/browser/ui/panels/panel_manager.h" | 10 #include "chrome/browser/ui/panels/panel_manager.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 } | 62 } |
63 | 63 |
64 PanelBrowserWindowGtk::~PanelBrowserWindowGtk() { | 64 PanelBrowserWindowGtk::~PanelBrowserWindowGtk() { |
65 if (drag_widget_) { | 65 if (drag_widget_) { |
66 // Terminate the grab if we have it. We could do this using any widget, | 66 // Terminate the grab if we have it. We could do this using any widget, |
67 // |drag_widget_| is just convenient. | 67 // |drag_widget_| is just convenient. |
68 gtk_grab_add(drag_widget_); | 68 gtk_grab_add(drag_widget_); |
69 gtk_grab_remove(drag_widget_); | 69 gtk_grab_remove(drag_widget_); |
70 DestroyDragWidget(); | 70 DestroyDragWidget(); |
71 } | 71 } |
| 72 panel_->manager()->Remove(panel_.get()); |
72 } | 73 } |
73 | 74 |
74 void PanelBrowserWindowGtk::Init() { | 75 void PanelBrowserWindowGtk::Init() { |
75 BrowserWindowGtk::Init(); | 76 BrowserWindowGtk::Init(); |
76 | 77 |
77 // Keep the window docked to the bottom of the screen on resizes. | 78 // Keep the window docked to the bottom of the screen on resizes. |
78 gtk_window_set_gravity(window(), GDK_GRAVITY_SOUTH_EAST); | 79 gtk_window_set_gravity(window(), GDK_GRAVITY_SOUTH_EAST); |
79 | 80 |
80 // Keep the window always on top. | 81 // Keep the window always on top. |
81 gtk_window_set_keep_above(window(), TRUE); | 82 gtk_window_set_keep_above(window(), TRUE); |
(...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
727 } | 728 } |
728 } | 729 } |
729 | 730 |
730 bool NativePanelTestingGtk::IsWindowSizeKnown() const { | 731 bool NativePanelTestingGtk::IsWindowSizeKnown() const { |
731 return panel_browser_window_gtk_->window_size_known_; | 732 return panel_browser_window_gtk_->window_size_known_; |
732 } | 733 } |
733 | 734 |
734 bool NativePanelTestingGtk::IsAnimatingBounds() const { | 735 bool NativePanelTestingGtk::IsAnimatingBounds() const { |
735 return panel_browser_window_gtk_->IsAnimatingBounds(); | 736 return panel_browser_window_gtk_->IsAnimatingBounds(); |
736 } | 737 } |
OLD | NEW |