| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #import "ios/web/public/web_state/web_state_delegate.h" | 5 #import "ios/web/public/web_state/web_state_delegate.h" |
| 6 | 6 |
| 7 #import "ios/web/public/web_state/web_state.h" | 7 #import "ios/web/public/web_state/web_state.h" |
| 8 | 8 |
| 9 namespace web { | 9 namespace web { |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 const WebState::OpenURLParams&) { | 23 const WebState::OpenURLParams&) { |
| 24 return nullptr; | 24 return nullptr; |
| 25 } | 25 } |
| 26 | 26 |
| 27 void WebStateDelegate::LoadProgressChanged(WebState*, double) {} | 27 void WebStateDelegate::LoadProgressChanged(WebState*, double) {} |
| 28 | 28 |
| 29 bool WebStateDelegate::HandleContextMenu(WebState*, const ContextMenuParams&) { | 29 bool WebStateDelegate::HandleContextMenu(WebState*, const ContextMenuParams&) { |
| 30 return false; | 30 return false; |
| 31 } | 31 } |
| 32 | 32 |
| 33 void WebStateDelegate::ShowRepostFormWarningDialog( |
| 34 WebState*, |
| 35 const base::Callback<void(bool)>& callback) { |
| 36 callback.Run(true); |
| 37 } |
| 38 |
| 33 JavaScriptDialogPresenter* WebStateDelegate::GetJavaScriptDialogPresenter( | 39 JavaScriptDialogPresenter* WebStateDelegate::GetJavaScriptDialogPresenter( |
| 34 WebState*) { | 40 WebState*) { |
| 35 return nullptr; | 41 return nullptr; |
| 36 } | 42 } |
| 37 | 43 |
| 38 void WebStateDelegate::OnAuthRequired(WebState* source, | 44 void WebStateDelegate::OnAuthRequired(WebState* source, |
| 39 NSURLProtectionSpace* protection_space, | 45 NSURLProtectionSpace* protection_space, |
| 40 NSURLCredential* proposed_credential, | 46 NSURLCredential* proposed_credential, |
| 41 const AuthCallback& callback) { | 47 const AuthCallback& callback) { |
| 42 callback.Run(nil, nil); | 48 callback.Run(nil, nil); |
| 43 } | 49 } |
| 44 | 50 |
| 45 void WebStateDelegate::Attach(WebState* source) { | 51 void WebStateDelegate::Attach(WebState* source) { |
| 46 DCHECK(attached_states_.find(source) == attached_states_.end()); | 52 DCHECK(attached_states_.find(source) == attached_states_.end()); |
| 47 attached_states_.insert(source); | 53 attached_states_.insert(source); |
| 48 } | 54 } |
| 49 | 55 |
| 50 void WebStateDelegate::Detach(WebState* source) { | 56 void WebStateDelegate::Detach(WebState* source) { |
| 51 DCHECK(attached_states_.find(source) != attached_states_.end()); | 57 DCHECK(attached_states_.find(source) != attached_states_.end()); |
| 52 attached_states_.erase(source); | 58 attached_states_.erase(source); |
| 53 } | 59 } |
| 54 | 60 |
| 55 } // web | 61 } // web |
| OLD | NEW |