Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Side by Side Diff: ios/web/web_state/web_state_impl.mm

Issue 2737943003: Moved window opening callback to WebStateDelegate. (Closed)
Patch Set: Rebased Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ios/web/web_state/web_state_impl.h ('k') | ios/web/web_state/web_state_impl_unittest.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #import "ios/web/web_state/web_state_impl.h" 5 #import "ios/web/web_state/web_state_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 JavaScriptDialogPresenter* presenter = 497 JavaScriptDialogPresenter* presenter =
498 delegate_ ? delegate_->GetJavaScriptDialogPresenter(this) : nullptr; 498 delegate_ ? delegate_->GetJavaScriptDialogPresenter(this) : nullptr;
499 if (!presenter) { 499 if (!presenter) {
500 callback.Run(false, nil); 500 callback.Run(false, nil);
501 return; 501 return;
502 } 502 }
503 presenter->RunJavaScriptDialog(this, origin_url, javascript_dialog_type, 503 presenter->RunJavaScriptDialog(this, origin_url, javascript_dialog_type,
504 message_text, default_prompt_text, callback); 504 message_text, default_prompt_text, callback);
505 } 505 }
506 506
507 WebState* WebStateImpl::CreateNewWebState(const GURL& url,
508 const GURL& opener_url,
509 bool initiated_by_user) {
510 if (delegate_) {
511 return delegate_->CreateNewWebState(this, url, opener_url,
512 initiated_by_user);
513 }
514 return nullptr;
515 }
516
507 void WebStateImpl::OnAuthRequired( 517 void WebStateImpl::OnAuthRequired(
508 NSURLProtectionSpace* protection_space, 518 NSURLProtectionSpace* protection_space,
509 NSURLCredential* proposed_credential, 519 NSURLCredential* proposed_credential,
510 const WebStateDelegate::AuthCallback& callback) { 520 const WebStateDelegate::AuthCallback& callback) {
511 if (delegate_) { 521 if (delegate_) {
512 delegate_->OnAuthRequired(this, protection_space, proposed_credential, 522 delegate_->OnAuthRequired(this, protection_space, proposed_credential,
513 callback); 523 callback);
514 } else { 524 } else {
515 callback.Run(nil, nil); 525 callback.Run(nil, nil);
516 } 526 }
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
730 const LoadCommittedDetails& load_details) { 740 const LoadCommittedDetails& load_details) {
731 for (auto& observer : observers_) 741 for (auto& observer : observers_)
732 observer.NavigationItemCommitted(load_details); 742 observer.NavigationItemCommitted(load_details);
733 } 743 }
734 744
735 WebState* WebStateImpl::GetWebState() { 745 WebState* WebStateImpl::GetWebState() {
736 return this; 746 return this;
737 } 747 }
738 748
739 } // namespace web 749 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/web_state/web_state_impl.h ('k') | ios/web/web_state/web_state_impl_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698