| 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 <gdk/gdkkeysyms.h> | 7 #include <gdk/gdkkeysyms.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 1993 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2004 DictionaryValue* window_preferences = update.Get(); | 2004 DictionaryValue* window_preferences = update.Get(); |
| 2005 // Note that we store left/top for consistency with Windows, but that we | 2005 // Note that we store left/top for consistency with Windows, but that we |
| 2006 // *don't* obey them; we only use them for computing width/height. See | 2006 // *don't* obey them; we only use them for computing width/height. See |
| 2007 // comments in SetGeometryHints(). | 2007 // comments in SetGeometryHints(). |
| 2008 window_preferences->SetInteger("left", restored_bounds_.x()); | 2008 window_preferences->SetInteger("left", restored_bounds_.x()); |
| 2009 window_preferences->SetInteger("top", restored_bounds_.y()); | 2009 window_preferences->SetInteger("top", restored_bounds_.y()); |
| 2010 window_preferences->SetInteger("right", restored_bounds_.right()); | 2010 window_preferences->SetInteger("right", restored_bounds_.right()); |
| 2011 window_preferences->SetInteger("bottom", restored_bounds_.bottom()); | 2011 window_preferences->SetInteger("bottom", restored_bounds_.bottom()); |
| 2012 window_preferences->SetBoolean("maximized", IsMaximized()); | 2012 window_preferences->SetBoolean("maximized", IsMaximized()); |
| 2013 | 2013 |
| 2014 gfx::Rect work_area( | 2014 gfx::Rect work_area(gfx::Screen::GetNativeScreen()->GetDisplayMatching( |
| 2015 gfx::Screen::GetDisplayMatching(restored_bounds_).work_area()); | 2015 restored_bounds_).work_area()); |
| 2016 window_preferences->SetInteger("work_area_left", work_area.x()); | 2016 window_preferences->SetInteger("work_area_left", work_area.x()); |
| 2017 window_preferences->SetInteger("work_area_top", work_area.y()); | 2017 window_preferences->SetInteger("work_area_top", work_area.y()); |
| 2018 window_preferences->SetInteger("work_area_right", work_area.right()); | 2018 window_preferences->SetInteger("work_area_right", work_area.right()); |
| 2019 window_preferences->SetInteger("work_area_bottom", work_area.bottom()); | 2019 window_preferences->SetInteger("work_area_bottom", work_area.bottom()); |
| 2020 } | 2020 } |
| 2021 | 2021 |
| 2022 void BrowserWindowGtk::InvalidateInfoBarBits() { | 2022 void BrowserWindowGtk::InvalidateInfoBarBits() { |
| 2023 gtk_widget_queue_draw(toolbar_border_); | 2023 gtk_widget_queue_draw(toolbar_border_); |
| 2024 gtk_widget_queue_draw(toolbar_->widget()); | 2024 gtk_widget_queue_draw(toolbar_->widget()); |
| 2025 if (bookmark_bar_.get() && | 2025 if (bookmark_bar_.get() && |
| (...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2417 wm_type == ui::WM_OPENBOX || | 2417 wm_type == ui::WM_OPENBOX || |
| 2418 wm_type == ui::WM_XFWM4); | 2418 wm_type == ui::WM_XFWM4); |
| 2419 } | 2419 } |
| 2420 | 2420 |
| 2421 // static | 2421 // static |
| 2422 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { | 2422 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { |
| 2423 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); | 2423 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); |
| 2424 browser_window_gtk->Init(); | 2424 browser_window_gtk->Init(); |
| 2425 return browser_window_gtk; | 2425 return browser_window_gtk; |
| 2426 } | 2426 } |
| OLD | NEW |