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

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

Issue 2637983002: Reading List: Show "Read Later" only on HTTP or HTTPS scheme. (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | no next file » | 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/chrome/browser/ui/browser_view_controller.h" 5 #import "ios/chrome/browser/ui/browser_view_controller.h"
6 6
7 #import <AssetsLibrary/AssetsLibrary.h> 7 #import <AssetsLibrary/AssetsLibrary.h>
8 #import <MobileCoreServices/MobileCoreServices.h> 8 #import <MobileCoreServices/MobileCoreServices.h>
9 #import <PassKit/PassKit.h> 9 #import <PassKit/PassKit.h>
10 #import <Photos/Photos.h> 10 #import <Photos/Photos.h>
(...skipping 2464 matching lines...) Expand 10 before | Expand all | Expand 10 after
2475 Record(ACTION_OPEN_IN_INCOGNITO_TAB, isImage, isLink); 2475 Record(ACTION_OPEN_IN_INCOGNITO_TAB, isImage, isLink);
2476 [weakSelf webPageOrderedOpen:link 2476 [weakSelf webPageOrderedOpen:link
2477 referrer:referrer 2477 referrer:referrer
2478 windowName:nil 2478 windowName:nil
2479 inIncognito:YES 2479 inIncognito:YES
2480 inBackground:NO 2480 inBackground:NO
2481 appendTo:kCurrentTab]; 2481 appendTo:kCurrentTab];
2482 }; 2482 };
2483 [_contextMenuCoordinator addItemWithTitle:title action:action]; 2483 [_contextMenuCoordinator addItemWithTitle:title action:action];
2484 } 2484 }
2485 2485 }
2486 if (reading_list::switches::IsReadingListEnabled()) { 2486 if (link.SchemeIsHTTPOrHTTPS() &&
2487 NSString* innerText = params.link_text; 2487 reading_list::switches::IsReadingListEnabled()) {
2488 if ([innerText length] > 0) { 2488 NSString* innerText = params.link_text;
2489 // Add to reading list. 2489 if ([innerText length] > 0) {
2490 title = l10n_util::GetNSStringWithFixup( 2490 // Add to reading list.
2491 IDS_IOS_CONTENT_CONTEXT_ADDTOREADINGLIST); 2491 title = l10n_util::GetNSStringWithFixup(
2492 action = ^{ 2492 IDS_IOS_CONTENT_CONTEXT_ADDTOREADINGLIST);
2493 Record(ACTION_READ_LATER, isImage, isLink); 2493 action = ^{
2494 [weakSelf addToReadingListURL:link title:innerText]; 2494 Record(ACTION_READ_LATER, isImage, isLink);
2495 }; 2495 [weakSelf addToReadingListURL:link title:innerText];
2496 [_contextMenuCoordinator addItemWithTitle:title action:action]; 2496 };
2497 } 2497 [_contextMenuCoordinator addItemWithTitle:title action:action];
2498 } 2498 }
2499 } 2499 }
2500 // Copy Link. 2500 // Copy Link.
2501 title = l10n_util::GetNSStringWithFixup(IDS_IOS_CONTENT_CONTEXT_COPY); 2501 title = l10n_util::GetNSStringWithFixup(IDS_IOS_CONTENT_CONTEXT_COPY);
2502 action = ^{ 2502 action = ^{
2503 Record(ACTION_COPY_LINK_ADDRESS, isImage, isLink); 2503 Record(ACTION_COPY_LINK_ADDRESS, isImage, isLink);
2504 NSURL* url = net::NSURLWithGURL(link); 2504 NSURL* url = net::NSURLWithGURL(link);
2505 NSDictionary* item = @{ 2505 NSDictionary* item = @{
2506 (NSString*)kUTTypeURL : url, 2506 (NSString*)kUTTypeURL : url,
2507 (NSString*)kUTTypeUTF8PlainText : 2507 (NSString*)kUTTypeUTF8PlainText :
(...skipping 2629 matching lines...) Expand 10 before | Expand all | Expand 10 after
5137 5137
5138 - (UIView*)voiceSearchButton { 5138 - (UIView*)voiceSearchButton {
5139 return _voiceSearchButton; 5139 return _voiceSearchButton;
5140 } 5140 }
5141 5141
5142 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner { 5142 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner {
5143 return [self currentLogoAnimationControllerOwner]; 5143 return [self currentLogoAnimationControllerOwner];
5144 } 5144 }
5145 5145
5146 @end 5146 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698