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

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

Issue 691703002: Modified DialogDelegateView to be accessible (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added a check to GetWidget() as well Created 6 years, 1 month 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
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 #include "base/i18n/rtl.h" 7 #include "base/i18n/rtl.h"
8 #include "base/memory/scoped_vector.h" 8 #include "base/memory/scoped_vector.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/favicon/favicon_tab_helper.h" 10 #include "chrome/browser/favicon/favicon_tab_helper.h"
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 354
355 void HungRendererDialogView::TabDestroyed() { 355 void HungRendererDialogView::TabDestroyed() {
356 GetWidget()->Close(); 356 GetWidget()->Close();
357 } 357 }
358 358
359 /////////////////////////////////////////////////////////////////////////////// 359 ///////////////////////////////////////////////////////////////////////////////
360 // HungRendererDialogView, views::View overrides: 360 // HungRendererDialogView, views::View overrides:
361 361
362 void HungRendererDialogView::ViewHierarchyChanged( 362 void HungRendererDialogView::ViewHierarchyChanged(
363 const ViewHierarchyChangedDetails& details) { 363 const ViewHierarchyChangedDetails& details) {
364 views::DialogDelegateView::ViewHierarchyChanged(details);
364 if (!initialized_ && details.is_add && details.child == this && GetWidget()) 365 if (!initialized_ && details.is_add && details.child == this && GetWidget())
365 Init(); 366 Init();
366 } 367 }
367 368
368 /////////////////////////////////////////////////////////////////////////////// 369 ///////////////////////////////////////////////////////////////////////////////
369 // HungRendererDialogView, private: 370 // HungRendererDialogView, private:
370 371
371 void HungRendererDialogView::Init() { 372 void HungRendererDialogView::Init() {
372 views::ImageView* frozen_icon_view = new views::ImageView; 373 views::ImageView* frozen_icon_view = new views::ImageView;
373 frozen_icon_view->SetImage(frozen_icon_); 374 frozen_icon_view->SetImage(frozen_icon_);
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 HungRendererDialogView* view = HungRendererDialogView::Create(toplevel_view); 443 HungRendererDialogView* view = HungRendererDialogView::Create(toplevel_view);
443 view->ShowForWebContents(contents); 444 view->ShowForWebContents(contents);
444 } 445 }
445 446
446 void HideHungRendererDialog(WebContents* contents) { 447 void HideHungRendererDialog(WebContents* contents) {
447 if (!logging::DialogsAreSuppressed() && HungRendererDialogView::GetInstance()) 448 if (!logging::DialogsAreSuppressed() && HungRendererDialogView::GetInstance())
448 HungRendererDialogView::GetInstance()->EndForWebContents(contents); 449 HungRendererDialogView::GetInstance()->EndForWebContents(contents);
449 } 450 }
450 451
451 } // namespace chrome 452 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698