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

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

Issue 2737353006: Replaced webPageOrderedClose with WebStateDelegate API. (Closed)
Patch Set: Addressed review comments 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 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 WebState* WebStateImpl::CreateNewWebState(const GURL& url, 507 WebState* WebStateImpl::CreateNewWebState(const GURL& url,
508 const GURL& opener_url, 508 const GURL& opener_url,
509 bool initiated_by_user) { 509 bool initiated_by_user) {
510 if (delegate_) { 510 if (delegate_) {
511 return delegate_->CreateNewWebState(this, url, opener_url, 511 return delegate_->CreateNewWebState(this, url, opener_url,
512 initiated_by_user); 512 initiated_by_user);
513 } 513 }
514 return nullptr; 514 return nullptr;
515 } 515 }
516 516
517 void WebStateImpl::CloseWebState() {
518 if (delegate_) {
519 delegate_->CloseWebState(this);
520 }
521 }
522
517 void WebStateImpl::OnAuthRequired( 523 void WebStateImpl::OnAuthRequired(
518 NSURLProtectionSpace* protection_space, 524 NSURLProtectionSpace* protection_space,
519 NSURLCredential* proposed_credential, 525 NSURLCredential* proposed_credential,
520 const WebStateDelegate::AuthCallback& callback) { 526 const WebStateDelegate::AuthCallback& callback) {
521 if (delegate_) { 527 if (delegate_) {
522 delegate_->OnAuthRequired(this, protection_space, proposed_credential, 528 delegate_->OnAuthRequired(this, protection_space, proposed_credential,
523 callback); 529 callback);
524 } else { 530 } else {
525 callback.Run(nil, nil); 531 callback.Run(nil, nil);
526 } 532 }
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 const LoadCommittedDetails& load_details) { 746 const LoadCommittedDetails& load_details) {
741 for (auto& observer : observers_) 747 for (auto& observer : observers_)
742 observer.NavigationItemCommitted(load_details); 748 observer.NavigationItemCommitted(load_details);
743 } 749 }
744 750
745 WebState* WebStateImpl::GetWebState() { 751 WebState* WebStateImpl::GetWebState() {
746 return this; 752 return this;
747 } 753 }
748 754
749 } // namespace web 755 } // 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