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

Side by Side Diff: chrome/browser/ui/views/hung_renderer_view.cc

Issue 10210005: Ash/aura split: NativeWidgetAura::GetWindowScreenBounds() should return screen bounds. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sky+oshima stuff Created 8 years, 8 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/browser_dialogs.h" 5 #include "chrome/browser/ui/browser_dialogs.h"
6 6
7 #if defined(OS_WIN) && !defined(USE_AURA) 7 #if defined(OS_WIN) && !defined(USE_AURA)
8 #include <windows.h> 8 #include <windows.h>
9 #endif 9 #endif
10 10
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 column_set->AddColumn(GridLayout::LEADING, GridLayout::LEADING, 0, 528 column_set->AddColumn(GridLayout::LEADING, GridLayout::LEADING, 0,
529 GridLayout::USE_PREF, 0, 0); 529 GridLayout::USE_PREF, 0, 0);
530 530
531 layout->StartRow(0, single_column_set_id); 531 layout->StartRow(0, single_column_set_id);
532 layout->AddView(kill_button_); 532 layout->AddView(kill_button_);
533 } 533 }
534 534
535 gfx::Rect HungRendererDialogView::GetDisplayBounds( 535 gfx::Rect HungRendererDialogView::GetDisplayBounds(
536 WebContents* contents) { 536 WebContents* contents) {
537 #if defined(USE_AURA) 537 #if defined(USE_AURA)
538 gfx::Rect contents_bounds(contents->GetNativeView()->GetScreenBounds()); 538 gfx::Rect contents_bounds(contents->GetNativeView()->GetBoundsInRootWindow());
539 #elif defined(OS_WIN) 539 #elif defined(OS_WIN)
540 HWND contents_hwnd = contents->GetNativeView(); 540 HWND contents_hwnd = contents->GetNativeView();
541 RECT contents_bounds_rect; 541 RECT contents_bounds_rect;
542 GetWindowRect(contents_hwnd, &contents_bounds_rect); 542 GetWindowRect(contents_hwnd, &contents_bounds_rect);
543 gfx::Rect contents_bounds(contents_bounds_rect); 543 gfx::Rect contents_bounds(contents_bounds_rect);
544 #endif 544 #endif
545 gfx::Rect window_bounds = GetWidget()->GetWindowScreenBounds(); 545 gfx::Rect window_bounds = GetWidget()->GetWindowScreenBounds();
546 546
547 int window_x = contents_bounds.x() + 547 int window_x = contents_bounds.x() +
548 (contents_bounds.width() - window_bounds.width()) / 2; 548 (contents_bounds.width() - window_bounds.width()) / 2;
(...skipping 27 matching lines...) Expand all
576 g_instance->ShowForWebContents(contents); 576 g_instance->ShowForWebContents(contents);
577 } 577 }
578 } 578 }
579 579
580 void HideHungRendererDialog(WebContents* contents) { 580 void HideHungRendererDialog(WebContents* contents) {
581 if (!logging::DialogsAreSuppressed() && g_instance) 581 if (!logging::DialogsAreSuppressed() && g_instance)
582 g_instance->EndForWebContents(contents); 582 g_instance->EndForWebContents(contents);
583 } 583 }
584 584
585 } // namespace browser 585 } // namespace browser
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/chrome_web_contents_view_delegate_views.cc ('k') | chrome/browser/ui/window_sizer_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698