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

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

Issue 115309: Remove even more ATL dependencies. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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
« no previous file with comments | « chrome/browser/views/frame/browser_frame.h ('k') | chrome/browser/views/infobars/infobars.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/hung_renderer_dialog.h" 5 #include "chrome/browser/hung_renderer_dialog.h"
6 6
7 #include "app/gfx/chrome_canvas.h" 7 #include "app/gfx/chrome_canvas.h"
8 #include "app/resource_bundle.h" 8 #include "app/resource_bundle.h"
9 #include "chrome/browser/browser_list.h" 9 #include "chrome/browser/browser_list.h"
10 #include "chrome/browser/renderer_host/render_process_host.h" 10 #include "chrome/browser/renderer_host/render_process_host.h"
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 column_set->AddColumn(GridLayout::LEADING, GridLayout::LEADING, 0, 398 column_set->AddColumn(GridLayout::LEADING, GridLayout::LEADING, 0,
399 GridLayout::USE_PREF, 0, 0); 399 GridLayout::USE_PREF, 0, 0);
400 400
401 layout->StartRow(0, single_column_set_id); 401 layout->StartRow(0, single_column_set_id);
402 layout->AddView(kill_button_); 402 layout->AddView(kill_button_);
403 } 403 }
404 404
405 gfx::Rect HungRendererDialogView::GetDisplayBounds( 405 gfx::Rect HungRendererDialogView::GetDisplayBounds(
406 TabContents* contents) { 406 TabContents* contents) {
407 HWND contents_hwnd = contents->GetNativeView(); 407 HWND contents_hwnd = contents->GetNativeView();
408 CRect contents_bounds; 408 RECT contents_bounds_rect;
409 GetWindowRect(contents_hwnd, &contents_bounds); 409 GetWindowRect(contents_hwnd, &contents_bounds_rect);
410 410 gfx::Rect contents_bounds(contents_bounds_rect);
411 gfx::Rect window_bounds = window()->GetBounds(); 411 gfx::Rect window_bounds = window()->GetBounds();
412 412
413 int window_x = contents_bounds.left + 413 int window_x = contents_bounds.x() +
414 (contents_bounds.Width() - window_bounds.width()) / 2; 414 (contents_bounds.width() - window_bounds.width()) / 2;
415 int window_y = contents_bounds.top + kOverlayContentsOffsetY; 415 int window_y = contents_bounds.y() + kOverlayContentsOffsetY;
416 return gfx::Rect(window_x, window_y, window_bounds.width(), 416 return gfx::Rect(window_x, window_y, window_bounds.width(),
417 window_bounds.height()); 417 window_bounds.height());
418 } 418 }
419 419
420 // static 420 // static
421 void HungRendererDialogView::InitClass() { 421 void HungRendererDialogView::InitClass() {
422 static bool initialized = false; 422 static bool initialized = false;
423 if (!initialized) { 423 if (!initialized) {
424 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 424 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
425 frozen_icon_ = rb.GetBitmapNamed(IDR_FROZEN_TAB_ICON); 425 frozen_icon_ = rb.GetBitmapNamed(IDR_FROZEN_TAB_ICON);
(...skipping 18 matching lines...) Expand all
444 g_instance = CreateHungRendererDialogView(); 444 g_instance = CreateHungRendererDialogView();
445 g_instance->ShowForTabContents(contents); 445 g_instance->ShowForTabContents(contents);
446 } 446 }
447 } 447 }
448 448
449 // static 449 // static
450 void HungRendererDialog::HideForTabContents(TabContents* contents) { 450 void HungRendererDialog::HideForTabContents(TabContents* contents) {
451 if (!logging::DialogsAreSuppressed() && g_instance) 451 if (!logging::DialogsAreSuppressed() && g_instance)
452 g_instance->EndForTabContents(contents); 452 g_instance->EndForTabContents(contents);
453 } 453 }
OLDNEW
« no previous file with comments | « chrome/browser/views/frame/browser_frame.h ('k') | chrome/browser/views/infobars/infobars.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698