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

Unified Diff: chrome/browser/gtk/browser_window_gtk.cc

Issue 165173: Merge 21946 - Move window to workarea origin if it is completely offscreen.... (Closed) Base URL: svn://chrome-svn/chrome/branches/195/src/
Patch Set: Created 11 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/views/chrome_views_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/browser_window_gtk.cc
===================================================================
--- chrome/browser/gtk/browser_window_gtk.cc (revision 22807)
+++ chrome/browser/gtk/browser_window_gtk.cc (working copy)
@@ -12,10 +12,12 @@
#include "base/base_paths_linux.h"
#include "base/command_line.h"
#include "base/gfx/gtk_util.h"
+#include "base/gfx/rect.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/message_loop.h"
#include "base/path_service.h"
+#include "base/scoped_ptr.h"
#include "base/string_util.h"
#include "base/time.h"
#include "chrome/app/chrome_dll_resource.h"
@@ -54,6 +56,7 @@
#include "chrome/browser/renderer_host/render_widget_host_view_gtk.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/tab_contents/tab_contents_view.h"
+#include "chrome/browser/window_sizer.h"
#include "chrome/common/gtk_util.h"
#include "chrome/common/notification_service.h"
#include "chrome/common/pref_names.h"
@@ -1305,6 +1308,15 @@
window_preferences->SetInteger(L"right", restored_bounds_.right());
window_preferences->SetInteger(L"bottom", restored_bounds_.bottom());
window_preferences->SetBoolean(L"maximized", IsMaximized());
+
+ scoped_ptr<WindowSizer::MonitorInfoProvider> monitor_info_provider(
+ WindowSizer::CreateDefaultMonitorInfoProvider());
+ gfx::Rect work_area(
+ monitor_info_provider->GetMonitorWorkAreaMatching(restored_bounds_));
+ window_preferences->SetInteger(L"work_area_left", work_area.x());
+ window_preferences->SetInteger(L"work_area_top", work_area.y());
+ window_preferences->SetInteger(L"work_area_right", work_area.right());
+ window_preferences->SetInteger(L"work_area_bottom", work_area.bottom());
}
// static
Property changes on: chrome\browser\gtk\browser_window_gtk.cc
___________________________________________________________________
Added: svn:mergeinfo
Merged /trunk/src/chrome/browser/gtk/browser_window_gtk.cc:r21946
Merged /branches/chrome_webkit_merge_branch/chrome/browser/gtk/browser_window_gtk.cc:r69-2775
« no previous file with comments | « no previous file | chrome/browser/views/chrome_views_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698