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

Side by Side Diff: ios/chrome/browser/ui/preload_controller.mm

Issue 2655463014: Pass the correct webState to the nativeContent. (Closed)
Patch Set: s/ithW// 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 <UIKit/UIKit.h> 5 #import <UIKit/UIKit.h>
6 6
7 #include "ios/chrome/browser/ui/preload_controller.h" 7 #include "ios/chrome/browser/ui/preload_controller.h"
8 8
9 #include "base/ios/device_util.h" 9 #include "base/ios/device_util.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 #pragma mark - 270 #pragma mark -
271 #pragma mark CRWNativeContentProvider implementation 271 #pragma mark CRWNativeContentProvider implementation
272 272
273 // Delegate the call to the original native provider. 273 // Delegate the call to the original native provider.
274 - (BOOL)hasControllerForURL:(const GURL&)url { 274 - (BOOL)hasControllerForURL:(const GURL&)url {
275 return [[tab_ webController].nativeProvider hasControllerForURL:url]; 275 return [[tab_ webController].nativeProvider hasControllerForURL:url];
276 } 276 }
277 277
278 // Override the CRWNativeContentProvider methods to cancel any prerenders that 278 // Override the CRWNativeContentProvider methods to cancel any prerenders that
279 // require native content. 279 // require native content.
280 - (id<CRWNativeContent>)controllerForURL:(const GURL&)url { 280 - (id<CRWNativeContent>)controllerForURL:(const GURL&)url
281 webState:(web::WebState*)webState {
281 [self schedulePrerenderCancel]; 282 [self schedulePrerenderCancel];
282 return nil; 283 return nil;
283 } 284 }
284 285
285 // Override the CRWNativeContentProvider methods to cancel any prerenders that 286 // Override the CRWNativeContentProvider methods to cancel any prerenders that
286 // require native content. 287 // require native content.
287 - (id<CRWNativeContent>)controllerForURL:(const GURL&)url 288 - (id<CRWNativeContent>)controllerForURL:(const GURL&)url
288 withError:(NSError*)error 289 withError:(NSError*)error
289 isPost:(BOOL)isPost { 290 isPost:(BOOL)isPost {
290 [self schedulePrerenderCancel]; 291 [self schedulePrerenderCancel];
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 scheduledURL_ = GURL(); 404 scheduledURL_ = GURL();
404 } 405 }
405 406
406 #pragma mark - TabDelegate 407 #pragma mark - TabDelegate
407 408
408 - (void)discardPrerender { 409 - (void)discardPrerender {
409 [self schedulePrerenderCancel]; 410 [self schedulePrerenderCancel];
410 } 411 }
411 412
412 @end 413 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698