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

Side by Side Diff: ios/chrome/browser/ui/key_commands_provider.h

Issue 2631733002: Avoid sending IDC_BACK/FORWARD when back/forward is not possible (Closed)
Patch Set: Rebased 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 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 #ifndef IOS_CHROME_BROWSER_UI_KEY_COMMANDS_PROVIDER_H_ 5 #ifndef IOS_CHROME_BROWSER_UI_KEY_COMMANDS_PROVIDER_H_
6 #define IOS_CHROME_BROWSER_UI_KEY_COMMANDS_PROVIDER_H_ 6 #define IOS_CHROME_BROWSER_UI_KEY_COMMANDS_PROVIDER_H_
7 7
8 #import <UIKit/UIKit.h> 8 #import <UIKit/UIKit.h>
9 9
10 @protocol KeyCommandsPlumbing<NSObject> 10 @protocol KeyCommandsPlumbing<NSObject>
11 11
12 #pragma mark Query information 12 #pragma mark Query information
13 13
14 // Whether the current profile is off-the-record. 14 // Whether the current profile is off-the-record.
15 - (BOOL)isOffTheRecord; 15 - (BOOL)isOffTheRecord;
16 16
17 // Returns the current number of tabs. 17 // Returns the current number of tabs.
18 - (NSUInteger)tabsCount; 18 - (NSUInteger)tabsCount;
19 19
20 // Whether navigation to the previous page is available.
21 - (BOOL)canGoBack;
22
23 // Whether navigation to the next page is available.
24 - (BOOL)canGoForward;
25
20 #pragma mark Call for action 26 #pragma mark Call for action
21 27
22 // Executes a Chrome command. |sender| must implement the |-tag| method and 28 // Executes a Chrome command. |sender| must implement the |-tag| method and
23 // return the id of the command to execute. See UIKit+ChromeExecuteCommand.h 29 // return the id of the command to execute. See UIKit+ChromeExecuteCommand.h
24 // for more details. 30 // for more details.
25 - (void)chromeExecuteCommand:(id)sender; 31 - (void)chromeExecuteCommand:(id)sender;
26 32
27 // Called to put the tab at index in focus. 33 // Called to put the tab at index in focus.
28 - (void)focusTabAtIndex:(NSUInteger)index; 34 - (void)focusTabAtIndex:(NSUInteger)index;
29 35
(...skipping 14 matching lines...) Expand all
44 // Handles the keyboard commands registration and handling for the 50 // Handles the keyboard commands registration and handling for the
45 // BrowserViewController. 51 // BrowserViewController.
46 @interface KeyCommandsProvider : NSObject 52 @interface KeyCommandsProvider : NSObject
47 53
48 - (NSArray*)keyCommandsForConsumer:(id<KeyCommandsPlumbing>)consumer 54 - (NSArray*)keyCommandsForConsumer:(id<KeyCommandsPlumbing>)consumer
49 editingText:(BOOL)editingText; 55 editingText:(BOOL)editingText;
50 56
51 @end 57 @end
52 58
53 #endif // IOS_CHROME_BROWSER_UI_KEY_COMMANDS_PROVIDER_H_ 59 #endif // IOS_CHROME_BROWSER_UI_KEY_COMMANDS_PROVIDER_H_
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/browser_view_controller.mm ('k') | ios/chrome/browser/ui/key_commands_provider.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698