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

Side by Side Diff: chrome/browser/app_modal_dialog_win.cc

Issue 2803017: Fix a crash when we try to close a js dialog that wasn't shown. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 6 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
« no previous file with comments | « chrome/browser/app_modal_dialog_gtk.cc ('k') | chrome/browser/js_modal_dialog.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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/app_modal_dialog.h" 5 #include "chrome/browser/app_modal_dialog.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/views/jsmessage_box_dialog.h" 8 #include "chrome/browser/views/jsmessage_box_dialog.h"
9 #include "views/window/dialog_delegate.h" 9 #include "views/window/dialog_delegate.h"
10 #include "views/window/window.h" 10 #include "views/window/window.h"
11 11
12 AppModalDialog::~AppModalDialog() { 12 AppModalDialog::~AppModalDialog() {
13 } 13 }
14 14
15 void AppModalDialog::CreateAndShowDialog() { 15 void AppModalDialog::CreateAndShowDialog() {
16 dialog_ = CreateNativeDialog(); 16 dialog_ = CreateNativeDialog();
17 DCHECK(dialog_->IsModal()); 17 DCHECK(dialog_->IsModal());
18 dialog_->ShowModalDialog(); 18 dialog_->ShowModalDialog();
19 } 19 }
20 20
21 void AppModalDialog::ActivateModalDialog() { 21 void AppModalDialog::ActivateModalDialog() {
22 DCHECK(dialog_);
22 dialog_->ActivateModalDialog(); 23 dialog_->ActivateModalDialog();
23 } 24 }
24 25
25 void AppModalDialog::CloseModalDialog() { 26 void AppModalDialog::CloseModalDialog() {
27 DCHECK(dialog_);
26 dialog_->CloseModalDialog(); 28 dialog_->CloseModalDialog();
27 } 29 }
OLDNEW
« no previous file with comments | « chrome/browser/app_modal_dialog_gtk.cc ('k') | chrome/browser/js_modal_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698