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

Side by Side Diff: ios/web/interstitials/web_interstitial_impl.mm

Issue 2672723003: Converted CRWSessionController to use NavigationItems. (Closed)
Patch Set: test fixes, self review Created 3 years, 10 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/BUILD.gn ('k') | ios/web/navigation/crw_session_controller.h » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/interstitials/web_interstitial_impl.h" 5 #import "ios/web/interstitials/web_interstitial_impl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ios/web/interstitials/web_interstitial_facade_delegate.h" 8 #include "ios/web/interstitials/web_interstitial_facade_delegate.h"
9 #import "ios/web/navigation/crw_session_controller.h" 9 #import "ios/web/navigation/crw_session_controller.h"
10 #import "ios/web/navigation/navigation_manager_impl.h" 10 #import "ios/web/navigation/navigation_manager_impl.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 void WebInterstitialImpl::Show() { 57 void WebInterstitialImpl::Show() {
58 PrepareForDisplay(); 58 PrepareForDisplay();
59 GetWebStateImpl()->ShowWebInterstitial(this); 59 GetWebStateImpl()->ShowWebInterstitial(this);
60 60
61 if (new_navigation_) { 61 if (new_navigation_) {
62 // TODO(stuartmorgan): Plumb transient entry handling through 62 // TODO(stuartmorgan): Plumb transient entry handling through
63 // NavigationManager, and remove the NavigationManagerImpl and 63 // NavigationManager, and remove the NavigationManagerImpl and
64 // SessionController usage here. 64 // SessionController usage here.
65 CRWSessionController* sessionController = 65 CRWSessionController* sessionController =
66 navigation_manager_->GetSessionController(); 66 navigation_manager_->GetSessionController();
67 [sessionController addTransientEntryWithURL:url_]; 67 [sessionController addTransientItemWithURL:url_];
68 68
69 // Give delegates a chance to set some states on the navigation item. 69 // Give delegates a chance to set some states on the navigation item.
70 GetDelegate()->OverrideItem(navigation_manager_->GetTransientItem()); 70 GetDelegate()->OverrideItem(navigation_manager_->GetTransientItem());
71 } 71 }
72 } 72 }
73 73
74 void WebInterstitialImpl::Hide() { 74 void WebInterstitialImpl::Hide() {
75 GetWebStateImpl()->ClearTransientContentView(); 75 GetWebStateImpl()->ClearTransientContentView();
76 } 76 }
77 77
(...skipping 30 matching lines...) Expand all
108 108
109 void WebInterstitialImpl::WebStateDestroyed() { 109 void WebInterstitialImpl::WebStateDestroyed() {
110 DontProceed(); 110 DontProceed();
111 } 111 }
112 112
113 WebStateImpl* WebInterstitialImpl::GetWebStateImpl() const { 113 WebStateImpl* WebInterstitialImpl::GetWebStateImpl() const {
114 return static_cast<web::WebStateImpl*>(web_state()); 114 return static_cast<web::WebStateImpl*>(web_state());
115 } 115 }
116 116
117 } // namespace web 117 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/BUILD.gn ('k') | ios/web/navigation/crw_session_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698