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

Side by Side Diff: ios/chrome/browser/ui/side_swipe/history_side_swipe_provider.mm

Issue 2587023002: Upstream Chrome on iOS source code [8/11]. (Closed)
Patch Set: 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
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #import "ios/chrome/browser/ui/side_swipe/history_side_swipe_provider.h"
6
7 @interface HistorySideSwipeProvider () {
8 // Keep a reference to detach before deallocing.
9 TabModel* _tabModel; // weak
10 }
11
12 @end
13
14 @implementation HistorySideSwipeProvider
15 - (instancetype)initWithTabModel:(TabModel*)tabModel {
16 self = [super init];
17 if (self) {
18 _tabModel = tabModel;
19 }
20 return self;
21 }
22
23 - (BOOL)canGoBack {
24 return [[_tabModel currentTab] canGoBack];
25 }
26
27 - (BOOL)canGoForward {
28 return [[_tabModel currentTab] canGoForward];
29 }
30
31 - (void)goForward:(web::WebState*)webState {
32 [[_tabModel currentTab] goForward];
33 }
34
35 - (void)goBack:(web::WebState*)webState {
36 [[_tabModel currentTab] goBack];
37 }
38
39 - (UIImage*)paneIcon {
40 return [UIImage imageNamed:@"side_swipe_navigation_back"];
41 }
42
43 - (BOOL)rotateForwardIcon {
44 return YES;
45 }
46
47 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698