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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 callback.Run(true, base::string16()); | 78 callback.Run(true, base::string16()); |
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::CancelActiveAndPendingDialogs( | 88 void JavaScriptDialogHelper::CancelDialogs(content::WebContents* web_contents, |
89 content::WebContents* web_contents) { | 89 bool suppress_callbacks, |
90 } | 90 bool reset_state) {} |
91 | |
92 void JavaScriptDialogHelper::ResetDialogState( | |
93 content::WebContents* web_contents) { | |
94 } | |
95 | 91 |
96 void JavaScriptDialogHelper::OnPermissionResponse( | 92 void JavaScriptDialogHelper::OnPermissionResponse( |
97 const DialogClosedCallback& callback, | 93 const DialogClosedCallback& callback, |
98 bool allow, | 94 bool allow, |
99 const std::string& user_input) { | 95 const std::string& user_input) { |
100 callback.Run(allow && web_view_guest_->attached(), | 96 callback.Run(allow && web_view_guest_->attached(), |
101 base::UTF8ToUTF16(user_input)); | 97 base::UTF8ToUTF16(user_input)); |
102 } | 98 } |
103 | 99 |
104 } // namespace extensions | 100 } // namespace extensions |
OLD | NEW |