| OLD | NEW |
| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 | 169 |
| 170 dialog_manager_ = | 170 dialog_manager_ = |
| 171 web_contents_->GetDelegate()->GetJavaScriptDialogManager(web_contents_); | 171 web_contents_->GetDelegate()->GetJavaScriptDialogManager(web_contents_); |
| 172 } | 172 } |
| 173 | 173 |
| 174 DialogHelper::~DialogHelper() { | 174 DialogHelper::~DialogHelper() { |
| 175 client_->set_helper(nullptr); | 175 client_->set_helper(nullptr); |
| 176 } | 176 } |
| 177 | 177 |
| 178 void DialogHelper::CloseDialogs() { | 178 void DialogHelper::CloseDialogs() { |
| 179 dialog_manager_->CancelDialogs(web_contents_, false, false); | 179 dialog_manager_->CancelDialogs(web_contents_, false); |
| 180 } | 180 } |
| 181 | 181 |
| 182 void DialogHelper::DialogOpened() { | 182 void DialogHelper::DialogOpened() { |
| 183 ++dialog_count_; | 183 ++dialog_count_; |
| 184 if (!quit_closure_.is_null()) { | 184 if (!quit_closure_.is_null()) { |
| 185 quit_closure_.Run(); | 185 quit_closure_.Run(); |
| 186 quit_closure_ = base::Closure(); | 186 quit_closure_ = base::Closure(); |
| 187 } | 187 } |
| 188 } | 188 } |
| 189 | 189 |
| (...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 660 ExtensionTestMessageListener iframe_loaded_listener("iframe loaded", false); | 660 ExtensionTestMessageListener iframe_loaded_listener("iframe loaded", false); |
| 661 ExtensionTestMessageListener content_script_listener("script injected", | 661 ExtensionTestMessageListener content_script_listener("script injected", |
| 662 false); | 662 false); |
| 663 LoadExtension(data_dir.AppendASCII("script_a_com")); | 663 LoadExtension(data_dir.AppendASCII("script_a_com")); |
| 664 LoadExtension(data_dir.AppendASCII("background_page_iframe")); | 664 LoadExtension(data_dir.AppendASCII("background_page_iframe")); |
| 665 iframe_loaded_listener.WaitUntilSatisfied(); | 665 iframe_loaded_listener.WaitUntilSatisfied(); |
| 666 EXPECT_FALSE(content_script_listener.was_satisfied()); | 666 EXPECT_FALSE(content_script_listener.was_satisfied()); |
| 667 } | 667 } |
| 668 | 668 |
| 669 } // namespace extensions | 669 } // namespace extensions |
| OLD | NEW |