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

Unified Diff: chrome/browser/ui/views/chrome_views_delegate.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: new android code 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/chrome_views_delegate.cc
diff --git a/chrome/browser/ui/views/chrome_views_delegate.cc b/chrome/browser/ui/views/chrome_views_delegate.cc
index 24a8c6e4f0f11678eba51a65b1b91e1c0241df97..430d7051a65844b0f80c2cb880a8477e58a647b6 100644
--- a/chrome/browser/ui/views/chrome_views_delegate.cc
+++ b/chrome/browser/ui/views/chrome_views_delegate.cc
@@ -79,8 +79,8 @@ void ChromeViewsDelegate::SaveWindowPlacement(const views::Widget* window,
window_preferences->SetInteger("bottom", bounds.bottom());
window_preferences->SetBoolean("maximized",
show_state == ui::SHOW_STATE_MAXIMIZED);
- gfx::Rect work_area(
- gfx::Screen::GetDisplayMatching(bounds).work_area());
+ gfx::Rect work_area(gfx::Screen::GetScreenFor(window->GetNativeView())->
+ GetDisplayMatching(bounds).work_area());
window_preferences->SetInteger("work_area_left", work_area.x());
window_preferences->SetInteger("work_area_top", work_area.y());
window_preferences->SetInteger("work_area_right", work_area.right());
@@ -168,7 +168,7 @@ int ChromeViewsDelegate::GetDispositionForEvent(int event_flags) {
#if defined(USE_AURA)
views::NativeWidgetHelperAura* ChromeViewsDelegate::CreateNativeWidgetHelper(
- views::NativeWidgetAura* native_widget) {
+ views::NativeWidgetAura* native_widget, gfx::NativeView parent) {
Ben Goodger (Google) 2012/10/10 22:52:10 given that you don't use this value here, I don't
scottmg 2012/10/11 00:22:28 Oops, thanks. I think that was from when this meth
#if !defined(OS_CHROMEOS) && !defined(OS_WIN)
// TODO(erg): get rid of this, it's interfering with desktop-aura.
return new views::DesktopNativeWidgetHelperAura(native_widget);
@@ -190,7 +190,7 @@ views::NativeWidget* ChromeViewsDelegate::CreateNativeWidget(
gfx::NativeView parent) {
#if defined(USE_AURA) && !defined(OS_CHROMEOS)
if (parent && type != views::Widget::InitParams::TYPE_MENU)
- return new views::NativeWidgetAura(delegate);
+ return new views::NativeWidgetAura(delegate, NULL);
if (CommandLine::ForCurrentProcess()->HasSwitch(
views::switches::kDesktopAura))
return new views::DesktopNativeWidgetAura(delegate);

Powered by Google App Engine
This is Rietveld 408576698