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 "chrome/browser/ui/panels/panel.h" | 7 #include "chrome/browser/ui/panels/panel.h" |
8 #include "chrome/browser/ui/panels/panel_manager.h" | 8 #include "chrome/browser/ui/panels/panel_manager.h" |
9 #include "ui/base/dragdrop/gtk_dnd_util.h" | 9 #include "ui/base/dragdrop/gtk_dnd_util.h" |
10 | 10 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 // detect the window edge for behavioral purposes. The edge, if any, | 65 // detect the window edge for behavioral purposes. The edge, if any, |
66 // is present only for visual aspects. | 66 // is present only for visual aspects. |
67 return FALSE; | 67 return FALSE; |
68 } | 68 } |
69 | 69 |
70 bool PanelBrowserWindowGtk::HandleTitleBarLeftMousePress( | 70 bool PanelBrowserWindowGtk::HandleTitleBarLeftMousePress( |
71 GdkEventButton* event, | 71 GdkEventButton* event, |
72 guint32 last_click_time, | 72 guint32 last_click_time, |
73 gfx::Point last_click_position) { | 73 gfx::Point last_click_position) { |
74 // In theory we should never enter this function as we have a handler for | 74 // In theory we should never enter this function as we have a handler for |
75 // button press on title bar where we handle this. Not putting NOTREACHED() | 75 // button press on titlebar where we handle this. Not putting NOTREACHED() |
76 // here because we don't want to crash if hit-testing for title bar in window | 76 // here because we don't want to crash if hit-testing for titlebar in window |
77 // button press handler in BrowserWindowGtk is off by a pixel or two. | 77 // button press handler in BrowserWindowGtk is off by a pixel or two. |
78 DLOG(WARNING) << "Hit-testing for title bar off by a pixel or two?"; | 78 DLOG(WARNING) << "Hit-testing for titlebar off by a pixel or two?"; |
79 return TRUE; | 79 return TRUE; |
80 } | 80 } |
81 | 81 |
82 void PanelBrowserWindowGtk::SaveWindowPosition() { | 82 void PanelBrowserWindowGtk::SaveWindowPosition() { |
83 // We don't save window position for panels as it's controlled by | 83 // We don't save window position for panels as it's controlled by |
84 // PanelManager. | 84 // PanelManager. |
85 return; | 85 return; |
86 } | 86 } |
87 | 87 |
88 void PanelBrowserWindowGtk::SetGeometryHints() { | 88 void PanelBrowserWindowGtk::SetGeometryHints() { |
(...skipping 26 matching lines...) Expand all Loading... |
115 | 115 |
116 void PanelBrowserWindowGtk::SetPanelBounds(const gfx::Rect& bounds) { | 116 void PanelBrowserWindowGtk::SetPanelBounds(const gfx::Rect& bounds) { |
117 SetBounds(bounds); | 117 SetBounds(bounds); |
118 } | 118 } |
119 | 119 |
120 void PanelBrowserWindowGtk::OnPanelExpansionStateChanged( | 120 void PanelBrowserWindowGtk::OnPanelExpansionStateChanged( |
121 Panel::ExpansionState expansion_state) { | 121 Panel::ExpansionState expansion_state) { |
122 NOTIMPLEMENTED(); | 122 NOTIMPLEMENTED(); |
123 } | 123 } |
124 | 124 |
125 bool PanelBrowserWindowGtk::ShouldBringUpPanelTitleBar(int mouse_x, | 125 bool PanelBrowserWindowGtk::ShouldBringUpPanelTitlebar(int mouse_x, |
126 int mouse_y) const { | 126 int mouse_y) const { |
127 NOTIMPLEMENTED(); | 127 NOTIMPLEMENTED(); |
128 return false; | 128 return false; |
129 } | 129 } |
130 | 130 |
131 void PanelBrowserWindowGtk::ClosePanel() { | 131 void PanelBrowserWindowGtk::ClosePanel() { |
132 Close(); | 132 Close(); |
133 } | 133 } |
134 | 134 |
135 void PanelBrowserWindowGtk::ActivatePanel() { | 135 void PanelBrowserWindowGtk::ActivatePanel() { |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 GTK_DRAG_RESULT_USER_CANCELLED); | 383 GTK_DRAG_RESULT_USER_CANCELLED); |
384 MessageLoopForUI::current()->RunAllPending(); | 384 MessageLoopForUI::current()->RunAllPending(); |
385 } | 385 } |
386 | 386 |
387 void NativePanelTestingGtk::FinishDragTitlebar() { | 387 void NativePanelTestingGtk::FinishDragTitlebar() { |
388 panel_browser_window_gtk_->OnDragFailed( | 388 panel_browser_window_gtk_->OnDragFailed( |
389 panel_browser_window_gtk_->drag_widget_, NULL, | 389 panel_browser_window_gtk_->drag_widget_, NULL, |
390 GTK_DRAG_RESULT_NO_TARGET); | 390 GTK_DRAG_RESULT_NO_TARGET); |
391 MessageLoopForUI::current()->RunAllPending(); | 391 MessageLoopForUI::current()->RunAllPending(); |
392 } | 392 } |
OLD | NEW |