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

Side by Side Diff: components/app_modal/app_modal_dialog.cc

Issue 2412843002: Simplify the JavaScriptDialogManager. (Closed)
Patch Set: braces Created 4 years, 2 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "components/app_modal/app_modal_dialog.h" 5 #include "components/app_modal/app_modal_dialog.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "components/app_modal/app_modal_dialog_queue.h" 9 #include "components/app_modal/app_modal_dialog_queue.h"
10 #include "components/app_modal/native_app_modal_dialog.h" 10 #include "components/app_modal/native_app_modal_dialog.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 native_dialog_ = CreateNativeDialog(); 45 native_dialog_ = CreateNativeDialog();
46 native_dialog_->ShowAppModalDialog(); 46 native_dialog_->ShowAppModalDialog();
47 if (app_modal_dialog_observer) 47 if (app_modal_dialog_observer)
48 app_modal_dialog_observer->Notify(this); 48 app_modal_dialog_observer->Notify(this);
49 } 49 }
50 50
51 bool AppModalDialog::IsValid() { 51 bool AppModalDialog::IsValid() {
52 return valid_; 52 return valid_;
53 } 53 }
54 54
55 void AppModalDialog::Invalidate() { 55 void AppModalDialog::Invalidate(bool suppress_callbacks) {
56 valid_ = false; 56 valid_ = false;
57 } 57 }
58 58
59 bool AppModalDialog::IsJavaScriptModalDialog() { 59 bool AppModalDialog::IsJavaScriptModalDialog() {
60 return false; 60 return false;
61 } 61 }
62 62
63 void AppModalDialog::ActivateModalDialog() { 63 void AppModalDialog::ActivateModalDialog() {
64 DCHECK(native_dialog_); 64 DCHECK(native_dialog_);
65 native_dialog_->ActivateAppModalDialog(); 65 native_dialog_->ActivateAppModalDialog();
66 } 66 }
67 67
68 void AppModalDialog::CloseModalDialog() { 68 void AppModalDialog::CloseModalDialog() {
69 DCHECK(native_dialog_); 69 DCHECK(native_dialog_);
70 native_dialog_->CloseAppModalDialog(); 70 native_dialog_->CloseAppModalDialog();
71 } 71 }
72 72
73 void AppModalDialog::CompleteDialog() { 73 void AppModalDialog::CompleteDialog() {
74 if (!completed_) { 74 if (!completed_) {
75 completed_ = true; 75 completed_ = true;
76 AppModalDialogQueue::GetInstance()->ShowNextDialog(); 76 AppModalDialogQueue::GetInstance()->ShowNextDialog();
77 } 77 }
78 } 78 }
79 79
80 } // namespace app_modal 80 } // namespace app_modal
OLDNEW
« no previous file with comments | « components/app_modal/app_modal_dialog.h ('k') | components/app_modal/javascript_app_modal_dialog.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698