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

Side by Side Diff: chrome/browser/ui/gtk/browser_window_gtk.cc

Issue 11030017: Add context to gfx::Screen calls in support of simultaneous desktop+ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix some new gfx::Screen additions Created 8 years, 2 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) 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 1994 matching lines...) Expand 10 before | Expand all | Expand 10 after
2005 DictionaryValue* window_preferences = update.Get(); 2005 DictionaryValue* window_preferences = update.Get();
2006 // Note that we store left/top for consistency with Windows, but that we 2006 // Note that we store left/top for consistency with Windows, but that we
2007 // *don't* obey them; we only use them for computing width/height. See 2007 // *don't* obey them; we only use them for computing width/height. See
2008 // comments in SetGeometryHints(). 2008 // comments in SetGeometryHints().
2009 window_preferences->SetInteger("left", restored_bounds_.x()); 2009 window_preferences->SetInteger("left", restored_bounds_.x());
2010 window_preferences->SetInteger("top", restored_bounds_.y()); 2010 window_preferences->SetInteger("top", restored_bounds_.y());
2011 window_preferences->SetInteger("right", restored_bounds_.right()); 2011 window_preferences->SetInteger("right", restored_bounds_.right());
2012 window_preferences->SetInteger("bottom", restored_bounds_.bottom()); 2012 window_preferences->SetInteger("bottom", restored_bounds_.bottom());
2013 window_preferences->SetBoolean("maximized", IsMaximized()); 2013 window_preferences->SetBoolean("maximized", IsMaximized());
2014 2014
2015 gfx::Rect work_area( 2015 gfx::Rect work_area(gfx::Screen::GetNativeScreen()->GetDisplayMatching(
2016 gfx::Screen::GetDisplayMatching(restored_bounds_).work_area()); 2016 restored_bounds_).work_area());
2017 window_preferences->SetInteger("work_area_left", work_area.x()); 2017 window_preferences->SetInteger("work_area_left", work_area.x());
2018 window_preferences->SetInteger("work_area_top", work_area.y()); 2018 window_preferences->SetInteger("work_area_top", work_area.y());
2019 window_preferences->SetInteger("work_area_right", work_area.right()); 2019 window_preferences->SetInteger("work_area_right", work_area.right());
2020 window_preferences->SetInteger("work_area_bottom", work_area.bottom()); 2020 window_preferences->SetInteger("work_area_bottom", work_area.bottom());
2021 } 2021 }
2022 2022
2023 void BrowserWindowGtk::InvalidateInfoBarBits() { 2023 void BrowserWindowGtk::InvalidateInfoBarBits() {
2024 gtk_widget_queue_draw(toolbar_border_); 2024 gtk_widget_queue_draw(toolbar_border_);
2025 gtk_widget_queue_draw(toolbar_->widget()); 2025 gtk_widget_queue_draw(toolbar_->widget());
2026 if (bookmark_bar_.get() && 2026 if (bookmark_bar_.get() &&
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
2418 wm_type == ui::WM_OPENBOX || 2418 wm_type == ui::WM_OPENBOX ||
2419 wm_type == ui::WM_XFWM4); 2419 wm_type == ui::WM_XFWM4);
2420 } 2420 }
2421 2421
2422 // static 2422 // static
2423 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { 2423 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) {
2424 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); 2424 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser);
2425 browser_window_gtk->Init(); 2425 browser_window_gtk->Init();
2426 return browser_window_gtk; 2426 return browser_window_gtk;
2427 } 2427 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698