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

Side by Side Diff: chrome/browser/ui/panels/panel_browser_window_gtk.cc

Issue 7537030: Make panel adjust bounds per preferred size change notification on Windows. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 months 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 #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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 } 102 }
103 103
104 void PanelBrowserWindowGtk::ShowPanel() { 104 void PanelBrowserWindowGtk::ShowPanel() {
105 Show(); 105 Show();
106 } 106 }
107 107
108 void PanelBrowserWindowGtk::ShowPanelInactive() { 108 void PanelBrowserWindowGtk::ShowPanelInactive() {
109 ShowInactive(); 109 ShowInactive();
110 } 110 }
111 111
112 gfx::Rect PanelBrowserWindowGtk::GetPanelRestoredBounds() const {
113 NOTIMPLEMENTED();
114 return bounds_;
115 }
116
112 gfx::Rect PanelBrowserWindowGtk::GetPanelBounds() const { 117 gfx::Rect PanelBrowserWindowGtk::GetPanelBounds() const {
113 return bounds_; 118 return bounds_;
114 } 119 }
115 120
121 void PanelBrowserWindowGtk::SetPanelRestoredBounds(const gfx::Rect& bounds) {
122 NOTIMPLEMENTED();
123 SetBounds(bounds);
124 }
125
116 void PanelBrowserWindowGtk::SetPanelBounds(const gfx::Rect& bounds) { 126 void PanelBrowserWindowGtk::SetPanelBounds(const gfx::Rect& bounds) {
117 SetBounds(bounds); 127 SetBounds(bounds);
118 } 128 }
119 129
120 void PanelBrowserWindowGtk::OnPanelExpansionStateChanged( 130 void PanelBrowserWindowGtk::OnPanelExpansionStateChanged(
121 Panel::ExpansionState expansion_state) { 131 Panel::ExpansionState expansion_state) {
122 NOTIMPLEMENTED(); 132 NOTIMPLEMENTED();
123 } 133 }
124 134
125 bool PanelBrowserWindowGtk::ShouldBringUpPanelTitleBar(int mouse_x, 135 bool PanelBrowserWindowGtk::ShouldBringUpPanelTitleBar(int mouse_x,
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 } 180 }
171 181
172 Browser* PanelBrowserWindowGtk::GetPanelBrowser() const { 182 Browser* PanelBrowserWindowGtk::GetPanelBrowser() const {
173 return browser(); 183 return browser();
174 } 184 }
175 185
176 void PanelBrowserWindowGtk::DestroyPanelBrowser() { 186 void PanelBrowserWindowGtk::DestroyPanelBrowser() {
177 DestroyBrowser(); 187 DestroyBrowser();
178 } 188 }
179 189
190 gfx::Size PanelBrowserWindowGtk::GetNonClientAreaSize() const {
191 NOTIMPLEMENTED();
192 return gfx::Size();
193 }
194
180 NativePanelTesting* PanelBrowserWindowGtk::GetNativePanelTesting() { 195 NativePanelTesting* PanelBrowserWindowGtk::GetNativePanelTesting() {
181 return this; 196 return this;
182 } 197 }
183 198
184 void PanelBrowserWindowGtk::SetBoundsImpl() { 199 void PanelBrowserWindowGtk::SetBoundsImpl() {
185 gtk_window_move(window_, bounds_.x(), bounds_.y()); 200 gtk_window_move(window_, bounds_.x(), bounds_.y());
186 gtk_window_resize(window(), bounds_.width(), bounds_.height()); 201 gtk_window_resize(window(), bounds_.width(), bounds_.height());
187 } 202 }
188 203
189 void PanelBrowserWindowGtk::WillProcessEvent(GdkEvent* event) { 204 void PanelBrowserWindowGtk::WillProcessEvent(GdkEvent* event) {
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 // if the user ended the drag with space or enter, we don't get a follow up 319 // if the user ended the drag with space or enter, we don't get a follow up
305 // event to tell us the drag has finished (either a drag-failed or a 320 // event to tell us the drag has finished (either a drag-failed or a
306 // drag-end). We post a task, instead of calling EndDrag right here, to give 321 // drag-end). We post a task, instead of calling EndDrag right here, to give
307 // GTK+ a chance to send the drag-failed event with the right status. If 322 // GTK+ a chance to send the drag-failed event with the right status. If
308 // GTK+ does send the drag-failed event, we cancel the task. 323 // GTK+ does send the drag-failed event, we cancel the task.
309 MessageLoop::current()->PostTask(FROM_HERE, 324 MessageLoop::current()->PostTask(FROM_HERE,
310 drag_end_factory_.NewRunnableMethod( 325 drag_end_factory_.NewRunnableMethod(
311 &PanelBrowserWindowGtk::EndDrag, false)); 326 &PanelBrowserWindowGtk::EndDrag, false));
312 return TRUE; 327 return TRUE;
313 } 328 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698