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 2077 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2088 // Note that we store left/top for consistency with Windows, but that we | 2088 // Note that we store left/top for consistency with Windows, but that we |
2089 // *don't* obey them; we only use them for computing width/height. See | 2089 // *don't* obey them; we only use them for computing width/height. See |
2090 // comments in SetGeometryHints(). | 2090 // comments in SetGeometryHints(). |
2091 window_preferences->SetInteger("left", restored_bounds_.x()); | 2091 window_preferences->SetInteger("left", restored_bounds_.x()); |
2092 window_preferences->SetInteger("top", restored_bounds_.y()); | 2092 window_preferences->SetInteger("top", restored_bounds_.y()); |
2093 window_preferences->SetInteger("right", restored_bounds_.right()); | 2093 window_preferences->SetInteger("right", restored_bounds_.right()); |
2094 window_preferences->SetInteger("bottom", restored_bounds_.bottom()); | 2094 window_preferences->SetInteger("bottom", restored_bounds_.bottom()); |
2095 window_preferences->SetBoolean("maximized", IsMaximized()); | 2095 window_preferences->SetBoolean("maximized", IsMaximized()); |
2096 | 2096 |
2097 gfx::Rect work_area( | 2097 gfx::Rect work_area( |
2098 gfx::Screen::GetMonitorWorkAreaMatching(restored_bounds_)); | 2098 gfx::Screen::GetMonitorMatching(restored_bounds_).work_area()); |
2099 window_preferences->SetInteger("work_area_left", work_area.x()); | 2099 window_preferences->SetInteger("work_area_left", work_area.x()); |
2100 window_preferences->SetInteger("work_area_top", work_area.y()); | 2100 window_preferences->SetInteger("work_area_top", work_area.y()); |
2101 window_preferences->SetInteger("work_area_right", work_area.right()); | 2101 window_preferences->SetInteger("work_area_right", work_area.right()); |
2102 window_preferences->SetInteger("work_area_bottom", work_area.bottom()); | 2102 window_preferences->SetInteger("work_area_bottom", work_area.bottom()); |
2103 } | 2103 } |
2104 | 2104 |
2105 void BrowserWindowGtk::InvalidateInfoBarBits() { | 2105 void BrowserWindowGtk::InvalidateInfoBarBits() { |
2106 gtk_widget_queue_draw(toolbar_border_); | 2106 gtk_widget_queue_draw(toolbar_border_); |
2107 gtk_widget_queue_draw(toolbar_->widget()); | 2107 gtk_widget_queue_draw(toolbar_->widget()); |
2108 if (bookmark_bar_.get() && | 2108 if (bookmark_bar_.get() && |
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2583 wm_type == ui::WM_OPENBOX || | 2583 wm_type == ui::WM_OPENBOX || |
2584 wm_type == ui::WM_XFWM4); | 2584 wm_type == ui::WM_XFWM4); |
2585 } | 2585 } |
2586 | 2586 |
2587 // static | 2587 // static |
2588 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { | 2588 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { |
2589 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); | 2589 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); |
2590 browser_window_gtk->Init(); | 2590 browser_window_gtk->Init(); |
2591 return browser_window_gtk; | 2591 return browser_window_gtk; |
2592 } | 2592 } |
OLD | NEW |