| OLD | NEW |
| 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 } |
| OLD | NEW |