| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include <utility> | 6 #include <utility> |
| 7 | 7 |
| 8 #include "base/base64.h" | 8 #include "base/base64.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 | 90 |
| 91 // WebContentsDelegate | 91 // WebContentsDelegate |
| 92 JavaScriptDialogManager* GetJavaScriptDialogManager( | 92 JavaScriptDialogManager* GetJavaScriptDialogManager( |
| 93 WebContents* source) override { | 93 WebContents* source) override { |
| 94 return this; | 94 return this; |
| 95 } | 95 } |
| 96 | 96 |
| 97 // JavaScriptDialogManager | 97 // JavaScriptDialogManager |
| 98 void RunJavaScriptDialog(WebContents* web_contents, | 98 void RunJavaScriptDialog(WebContents* web_contents, |
| 99 const GURL& origin_url, | 99 const GURL& origin_url, |
| 100 JavaScriptMessageType javascript_message_type, | 100 JavaScriptDialogType dialog_type, |
| 101 const base::string16& message_text, | 101 const base::string16& message_text, |
| 102 const base::string16& default_prompt_text, | 102 const base::string16& default_prompt_text, |
| 103 const DialogClosedCallback& callback, | 103 const DialogClosedCallback& callback, |
| 104 bool* did_suppress_message) override { | 104 bool* did_suppress_message) override { |
| 105 if (handle_) { | 105 if (handle_) { |
| 106 handle_ = false; | 106 handle_ = false; |
| 107 callback.Run(true, base::string16()); | 107 callback.Run(true, base::string16()); |
| 108 } else { | 108 } else { |
| 109 callback_ = callback; | 109 callback_ = callback; |
| 110 } | 110 } |
| (...skipping 1534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1645 EXPECT_EQ("polyglottal", value); | 1645 EXPECT_EQ("polyglottal", value); |
| 1646 found++; | 1646 found++; |
| 1647 } else { | 1647 } else { |
| 1648 FAIL(); | 1648 FAIL(); |
| 1649 } | 1649 } |
| 1650 } | 1650 } |
| 1651 EXPECT_EQ(2u, found); | 1651 EXPECT_EQ(2u, found); |
| 1652 } | 1652 } |
| 1653 | 1653 |
| 1654 } // namespace content | 1654 } // namespace content |
| OLD | NEW |