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 #import "ios/web/shell/view_controller.h" | 5 #import "ios/web/shell/view_controller.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <utility> | 10 #include <utility> |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 | 126 |
127 NavigationManager::WebLoadParams params(GURL("https://dev.chromium.org/")); | 127 NavigationManager::WebLoadParams params(GURL("https://dev.chromium.org/")); |
128 params.transition_type = ui::PAGE_TRANSITION_TYPED; | 128 params.transition_type = ui::PAGE_TRANSITION_TYPED; |
129 self.navigationManager->LoadURLWithParams(params); | 129 self.navigationManager->LoadURLWithParams(params); |
130 } | 130 } |
131 | 131 |
132 - (NavigationManager*)navigationManager { | 132 - (NavigationManager*)navigationManager { |
133 return _webState->GetNavigationManager(); | 133 return _webState->GetNavigationManager(); |
134 } | 134 } |
135 | 135 |
| 136 - (web::WebState*)webState { |
| 137 return _webState.get(); |
| 138 } |
| 139 |
136 - (void)setUpNetworkStack { | 140 - (void)setUpNetworkStack { |
137 // Disable the default cache. | 141 // Disable the default cache. |
138 [NSURLCache setSharedURLCache:[EmptyNSURLCache emptyNSURLCache]]; | 142 [NSURLCache setSharedURLCache:[EmptyNSURLCache emptyNSURLCache]]; |
139 net::CookieStoreIOS::SetCookiePolicy(net::CookieStoreIOS::ALLOW); | 143 net::CookieStoreIOS::SetCookiePolicy(net::CookieStoreIOS::ALLOW); |
140 } | 144 } |
141 | 145 |
142 - (void)didReceiveMemoryWarning { | 146 - (void)didReceiveMemoryWarning { |
143 [super didReceiveMemoryWarning]; | 147 [super didReceiveMemoryWarning]; |
144 } | 148 } |
145 | 149 |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 (const web::LoadCommittedDetails&)details { | 256 (const web::LoadCommittedDetails&)details { |
253 [self updateToolbar]; | 257 [self updateToolbar]; |
254 } | 258 } |
255 | 259 |
256 - (void)webStateDidLoadPage:(web::WebState*)webState { | 260 - (void)webStateDidLoadPage:(web::WebState*)webState { |
257 DCHECK_EQ(_webState.get(), webState); | 261 DCHECK_EQ(_webState.get(), webState); |
258 [self updateToolbar]; | 262 [self updateToolbar]; |
259 } | 263 } |
260 | 264 |
261 @end | 265 @end |
OLD | NEW |