| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/browser/guest_view/web_view/javascript_dialog_helper.h" | 5 #include "extensions/browser/guest_view/web_view/javascript_dialog_helper.h" |
| 6 | 6 |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "components/guest_view/common/guest_view_constants.h" | 9 #include "components/guest_view/common/guest_view_constants.h" |
| 10 #include "extensions/browser/guest_view/web_view/web_view_constants.h" | 10 #include "extensions/browser/guest_view/web_view/web_view_constants.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 } | 79 } |
| 80 | 80 |
| 81 bool JavaScriptDialogHelper::HandleJavaScriptDialog( | 81 bool JavaScriptDialogHelper::HandleJavaScriptDialog( |
| 82 content::WebContents* web_contents, | 82 content::WebContents* web_contents, |
| 83 bool accept, | 83 bool accept, |
| 84 const base::string16* prompt_override) { | 84 const base::string16* prompt_override) { |
| 85 return false; | 85 return false; |
| 86 } | 86 } |
| 87 | 87 |
| 88 void JavaScriptDialogHelper::CancelDialogs(content::WebContents* web_contents, | 88 void JavaScriptDialogHelper::CancelDialogs(content::WebContents* web_contents, |
| 89 bool suppress_callbacks, | |
| 90 bool reset_state) {} | 89 bool reset_state) {} |
| 91 | 90 |
| 92 void JavaScriptDialogHelper::OnPermissionResponse( | 91 void JavaScriptDialogHelper::OnPermissionResponse( |
| 93 const DialogClosedCallback& callback, | 92 const DialogClosedCallback& callback, |
| 94 bool allow, | 93 bool allow, |
| 95 const std::string& user_input) { | 94 const std::string& user_input) { |
| 96 callback.Run(allow && web_view_guest_->attached(), | 95 callback.Run(allow && web_view_guest_->attached(), |
| 97 base::UTF8ToUTF16(user_input)); | 96 base::UTF8ToUTF16(user_input)); |
| 98 } | 97 } |
| 99 | 98 |
| 100 } // namespace extensions | 99 } // namespace extensions |
| OLD | NEW |