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 <stdint.h> | 5 #include <stdint.h> |
6 #include <utility> | 6 #include <utility> |
7 | 7 |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 3390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3401 const std::string& accept_lang, | 3401 const std::string& accept_lang, |
3402 JavaScriptMessageType javascript_message_type, | 3402 JavaScriptMessageType javascript_message_type, |
3403 const base::string16& message_text, | 3403 const base::string16& message_text, |
3404 const base::string16& default_prompt_text, | 3404 const base::string16& default_prompt_text, |
3405 const DialogClosedCallback& callback, | 3405 const DialogClosedCallback& callback, |
3406 bool* did_suppress_message) override { | 3406 bool* did_suppress_message) override { |
3407 *did_suppress_message = true; | 3407 *did_suppress_message = true; |
3408 }; | 3408 }; |
3409 | 3409 |
3410 void RunBeforeUnloadDialog(WebContents* web_contents, | 3410 void RunBeforeUnloadDialog(WebContents* web_contents, |
3411 const base::string16& message_text, | |
3412 bool is_reload, | 3411 bool is_reload, |
3413 const DialogClosedCallback& callback) override {} | 3412 const DialogClosedCallback& callback) override {} |
3414 | 3413 |
3415 bool HandleJavaScriptDialog(WebContents* web_contents, | 3414 bool HandleJavaScriptDialog(WebContents* web_contents, |
3416 bool accept, | 3415 bool accept, |
3417 const base::string16* prompt_override) override { | 3416 const base::string16* prompt_override) override { |
3418 return true; | 3417 return true; |
3419 } | 3418 } |
3420 | 3419 |
3421 void CancelActiveAndPendingDialogs(WebContents* web_contents) override {} | 3420 void CancelActiveAndPendingDialogs(WebContents* web_contents) override {} |
(...skipping 20 matching lines...) Expand all Loading... |
3442 // An automatic navigation. | 3441 // An automatic navigation. |
3443 contents()->GetMainFrame()->SendNavigateWithModificationCallback( | 3442 contents()->GetMainFrame()->SendNavigateWithModificationCallback( |
3444 2, 0, true, GURL(url::kAboutBlankURL), base::Bind(SetAsNonUserGesture)); | 3443 2, 0, true, GURL(url::kAboutBlankURL), base::Bind(SetAsNonUserGesture)); |
3445 | 3444 |
3446 EXPECT_EQ(1u, delegate->reset_count()); | 3445 EXPECT_EQ(1u, delegate->reset_count()); |
3447 | 3446 |
3448 contents()->SetJavaScriptDialogManagerForTesting(nullptr); | 3447 contents()->SetJavaScriptDialogManagerForTesting(nullptr); |
3449 } | 3448 } |
3450 | 3449 |
3451 } // namespace content | 3450 } // namespace content |
OLD | NEW |