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

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

Issue 14566024: Remove hung renderer dialog black border. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove debugging code. Created 7 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/ui/views/hung_renderer_view.h ('k') | no next file » | 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) 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/views/hung_renderer_view.h" 5 #include "chrome/browser/ui/views/hung_renderer_view.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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 184
185 // Padding space in pixels between frozen icon to the info label, hung pages 185 // Padding space in pixels between frozen icon to the info label, hung pages
186 // list table view and the Kill pages button. 186 // list table view and the Kill pages button.
187 static const int kCentralColumnPadding = 187 static const int kCentralColumnPadding =
188 views::kUnrelatedControlLargeHorizontalSpacing; 188 views::kUnrelatedControlLargeHorizontalSpacing;
189 189
190 /////////////////////////////////////////////////////////////////////////////// 190 ///////////////////////////////////////////////////////////////////////////////
191 // HungRendererDialogView, public: 191 // HungRendererDialogView, public:
192 192
193 // static 193 // static
194 HungRendererDialogView* HungRendererDialogView::Create() { 194 HungRendererDialogView* HungRendererDialogView::Create(
195 gfx::NativeView context) {
195 if (!g_instance_) { 196 if (!g_instance_) {
196 g_instance_ = new HungRendererDialogView; 197 g_instance_ = new HungRendererDialogView;
197 views::Widget::CreateWindow(g_instance_); 198 views::DialogDelegate::CreateDialogWidget(g_instance_, context, NULL);
198 } 199 }
199 return g_instance_; 200 return g_instance_;
200 } 201 }
201 202
202 // static 203 // static
203 HungRendererDialogView* HungRendererDialogView::GetInstance() { 204 HungRendererDialogView* HungRendererDialogView::GetInstance() {
204 return g_instance_; 205 return g_instance_;
205 } 206 }
206 207
207 // static 208 // static
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 frozen_icon_ = rb.GetImageSkiaNamed(IDR_FROZEN_TAB_ICON); 436 frozen_icon_ = rb.GetImageSkiaNamed(IDR_FROZEN_TAB_ICON);
436 initialized = true; 437 initialized = true;
437 } 438 }
438 } 439 }
439 440
440 namespace chrome { 441 namespace chrome {
441 442
442 void ShowHungRendererDialog(WebContents* contents) { 443 void ShowHungRendererDialog(WebContents* contents) {
443 if (!logging::DialogsAreSuppressed() && 444 if (!logging::DialogsAreSuppressed() &&
444 !PlatformShowCustomHungRendererDialog(contents)) { 445 !PlatformShowCustomHungRendererDialog(contents)) {
445 HungRendererDialogView* view = HungRendererDialogView::Create(); 446 HungRendererDialogView* view = HungRendererDialogView::Create(
447 platform_util::GetTopLevel(contents->GetView()->GetNativeView()));
446 view->ShowForWebContents(contents); 448 view->ShowForWebContents(contents);
447 } 449 }
448 } 450 }
449 451
450 void HideHungRendererDialog(WebContents* contents) { 452 void HideHungRendererDialog(WebContents* contents) {
451 if (!logging::DialogsAreSuppressed() && 453 if (!logging::DialogsAreSuppressed() &&
452 !PlatformHideCustomHungRendererDialog(contents) && 454 !PlatformHideCustomHungRendererDialog(contents) &&
453 HungRendererDialogView::GetInstance()) 455 HungRendererDialogView::GetInstance())
454 HungRendererDialogView::GetInstance()->EndForWebContents(contents); 456 HungRendererDialogView::GetInstance()->EndForWebContents(contents);
455 } 457 }
456 458
457 } // namespace chrome 459 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/hung_renderer_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698