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 2112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2123 // Note that we store left/top for consistency with Windows, but that we | 2123 // Note that we store left/top for consistency with Windows, but that we |
2124 // *don't* obey them; we only use them for computing width/height. See | 2124 // *don't* obey them; we only use them for computing width/height. See |
2125 // comments in SetGeometryHints(). | 2125 // comments in SetGeometryHints(). |
2126 window_preferences->SetInteger("left", restored_bounds_.x()); | 2126 window_preferences->SetInteger("left", restored_bounds_.x()); |
2127 window_preferences->SetInteger("top", restored_bounds_.y()); | 2127 window_preferences->SetInteger("top", restored_bounds_.y()); |
2128 window_preferences->SetInteger("right", restored_bounds_.right()); | 2128 window_preferences->SetInteger("right", restored_bounds_.right()); |
2129 window_preferences->SetInteger("bottom", restored_bounds_.bottom()); | 2129 window_preferences->SetInteger("bottom", restored_bounds_.bottom()); |
2130 window_preferences->SetBoolean("maximized", IsMaximized()); | 2130 window_preferences->SetBoolean("maximized", IsMaximized()); |
2131 | 2131 |
2132 gfx::Rect work_area( | 2132 gfx::Rect work_area( |
2133 gfx::Screen::GetMonitorMatching(restored_bounds_).work_area()); | 2133 gfx::Screen::GetDisplayMatching(restored_bounds_).work_area()); |
2134 window_preferences->SetInteger("work_area_left", work_area.x()); | 2134 window_preferences->SetInteger("work_area_left", work_area.x()); |
2135 window_preferences->SetInteger("work_area_top", work_area.y()); | 2135 window_preferences->SetInteger("work_area_top", work_area.y()); |
2136 window_preferences->SetInteger("work_area_right", work_area.right()); | 2136 window_preferences->SetInteger("work_area_right", work_area.right()); |
2137 window_preferences->SetInteger("work_area_bottom", work_area.bottom()); | 2137 window_preferences->SetInteger("work_area_bottom", work_area.bottom()); |
2138 } | 2138 } |
2139 | 2139 |
2140 void BrowserWindowGtk::InvalidateInfoBarBits() { | 2140 void BrowserWindowGtk::InvalidateInfoBarBits() { |
2141 gtk_widget_queue_draw(toolbar_border_); | 2141 gtk_widget_queue_draw(toolbar_border_); |
2142 gtk_widget_queue_draw(toolbar_->widget()); | 2142 gtk_widget_queue_draw(toolbar_->widget()); |
2143 if (bookmark_bar_.get() && | 2143 if (bookmark_bar_.get() && |
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2611 wm_type == ui::WM_OPENBOX || | 2611 wm_type == ui::WM_OPENBOX || |
2612 wm_type == ui::WM_XFWM4); | 2612 wm_type == ui::WM_XFWM4); |
2613 } | 2613 } |
2614 | 2614 |
2615 // static | 2615 // static |
2616 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { | 2616 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { |
2617 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); | 2617 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); |
2618 browser_window_gtk->Init(); | 2618 browser_window_gtk->Init(); |
2619 return browser_window_gtk; | 2619 return browser_window_gtk; |
2620 } | 2620 } |
OLD | NEW |