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

Side by Side Diff: ios/web/web_state/ui/crw_web_controller.mm

Issue 2562993002: Disallow [in]equality operator for PageTransition (Closed)
Patch Set: Disallow [in]equality operator for PageTransition Created 4 years 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 | « content/test/test_render_frame_host.cc ('k') | ui/base/page_transition_types.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 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 "ios/web/web_state/ui/crw_web_controller.h" 5 #import "ios/web/web_state/ui/crw_web_controller.h"
6 6
7 #import <WebKit/WebKit.h> 7 #import <WebKit/WebKit.h>
8 8
9 #import <objc/runtime.h> 9 #import <objc/runtime.h>
10 #include <stddef.h> 10 #include <stddef.h>
(...skipping 3382 matching lines...) Expand 10 before | Expand all | Expand 10 after
3393 return NO; 3393 return NO;
3394 } 3394 }
3395 3395
3396 // Check if the link navigation leads to a launch of an external app. 3396 // Check if the link navigation leads to a launch of an external app.
3397 // TODO(crbug.com/607780): Revise the logic of allowing external app launch 3397 // TODO(crbug.com/607780): Revise the logic of allowing external app launch
3398 // and move it to externalAppLauncher. 3398 // and move it to externalAppLauncher.
3399 BOOL isOpenInNewTabNavigation = 3399 BOOL isOpenInNewTabNavigation =
3400 !_webStateImpl->GetNavigationManager()->GetItemCount(); 3400 !_webStateImpl->GetNavigationManager()->GetItemCount();
3401 BOOL isPossibleLinkClick = [self isLinkNavigation:action.navigationType]; 3401 BOOL isPossibleLinkClick = [self isLinkNavigation:action.navigationType];
3402 if (isPossibleLinkClick || isOpenInNewTabNavigation || 3402 if (isPossibleLinkClick || isOpenInNewTabNavigation ||
3403 [self currentTransition] == ui::PAGE_TRANSITION_AUTO_BOOKMARK) { 3403 PageTransitionCoreTypeIs([self currentTransition],
3404 ui::PAGE_TRANSITION_AUTO_BOOKMARK)) {
3404 // Check If the URL is handled by a native app. 3405 // Check If the URL is handled by a native app.
3405 if ([self urlTriggersNativeAppLaunch:requestURL 3406 if ([self urlTriggersNativeAppLaunch:requestURL
3406 sourceURL:[self currentNavigationURL] 3407 sourceURL:[self currentNavigationURL]
3407 linkActivatedNavigation:isNavigationTypeLinkActivated]) { 3408 linkActivatedNavigation:isNavigationTypeLinkActivated]) {
3408 // External app has been launched successfully. Stop the current page 3409 // External app has been launched successfully. Stop the current page
3409 // load operation (e.g. notifying all observers) and record the URL so 3410 // load operation (e.g. notifying all observers) and record the URL so
3410 // that errors reported following the 'NO' reply can be safely ignored. 3411 // that errors reported following the 'NO' reply can be safely ignored.
3411 if ([self shouldClosePageOnNativeApplicationLoad]) 3412 if ([self shouldClosePageOnNativeApplicationLoad])
3412 [_delegate webPageOrderedClose]; 3413 [_delegate webPageOrderedClose];
3413 [self stopLoading]; 3414 [self stopLoading];
(...skipping 2378 matching lines...) Expand 10 before | Expand all | Expand 10 after
5792 } 5793 }
5793 5794
5794 return web::WEB_VIEW_DOCUMENT_TYPE_GENERIC; 5795 return web::WEB_VIEW_DOCUMENT_TYPE_GENERIC;
5795 } 5796 }
5796 5797
5797 - (NSString*)refererFromNavigationAction:(WKNavigationAction*)action { 5798 - (NSString*)refererFromNavigationAction:(WKNavigationAction*)action {
5798 return [action.request valueForHTTPHeaderField:@"Referer"]; 5799 return [action.request valueForHTTPHeaderField:@"Referer"];
5799 } 5800 }
5800 5801
5801 @end 5802 @end
OLDNEW
« no previous file with comments | « content/test/test_render_frame_host.cc ('k') | ui/base/page_transition_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698