OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/gtk/browser_window_gtk.h" | 5 #include "chrome/browser/ui/gtk/browser_window_gtk.h" |
6 | 6 |
7 #include <dlfcn.h> | 7 #include <dlfcn.h> |
8 #include <gdk/gdkkeysyms.h> | 8 #include <gdk/gdkkeysyms.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 1505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1516 gboolean BrowserWindowGtk::OnConfigure(GtkWidget* widget, | 1516 gboolean BrowserWindowGtk::OnConfigure(GtkWidget* widget, |
1517 GdkEventConfigure* event) { | 1517 GdkEventConfigure* event) { |
1518 gfx::Rect bounds(event->x, event->y, event->width, event->height); | 1518 gfx::Rect bounds(event->x, event->y, event->width, event->height); |
1519 | 1519 |
1520 // When the window moves, we'll get multiple configure-event signals. We can | 1520 // When the window moves, we'll get multiple configure-event signals. We can |
1521 // also get events when the bounds haven't changed, but the window's stacking | 1521 // also get events when the bounds haven't changed, but the window's stacking |
1522 // has, which we aren't interested in. http://crbug.com/70125 | 1522 // has, which we aren't interested in. http://crbug.com/70125 |
1523 if (bounds == configure_bounds_) | 1523 if (bounds == configure_bounds_) |
1524 return FALSE; | 1524 return FALSE; |
1525 | 1525 |
1526 GetLocationBar()->GetLocationEntry()->ClosePopup(); | 1526 GetLocationBar()->GetLocationEntry()->CloseOmniboxPopup(); |
1527 | 1527 |
1528 TabContents* tab = GetDisplayedTab(); | 1528 TabContents* tab = GetDisplayedTab(); |
1529 if (tab) { | 1529 if (tab) { |
1530 tab->web_contents()->GetRenderViewHost()->NotifyMoveOrResizeStarted(); | 1530 tab->web_contents()->GetRenderViewHost()->NotifyMoveOrResizeStarted(); |
1531 } | 1531 } |
1532 | 1532 |
1533 if (bounds_.size() != bounds.size()) | 1533 if (bounds_.size() != bounds.size()) |
1534 OnSizeChanged(bounds.width(), bounds.height()); | 1534 OnSizeChanged(bounds.width(), bounds.height()); |
1535 | 1535 |
1536 // We update |bounds_| but not |restored_bounds_| here. The latter needs | 1536 // We update |bounds_| but not |restored_bounds_| here. The latter needs |
(...skipping 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2593 wm_type == ui::WM_OPENBOX || | 2593 wm_type == ui::WM_OPENBOX || |
2594 wm_type == ui::WM_XFWM4); | 2594 wm_type == ui::WM_XFWM4); |
2595 } | 2595 } |
2596 | 2596 |
2597 // static | 2597 // static |
2598 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { | 2598 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { |
2599 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); | 2599 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); |
2600 browser_window_gtk->Init(); | 2600 browser_window_gtk->Init(); |
2601 return browser_window_gtk; | 2601 return browser_window_gtk; |
2602 } | 2602 } |
OLD | NEW |