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

Unified Diff: ios/chrome/browser/ui/ntp/new_tab_page_toolbar_controller.mm

Issue 2965943002: [ios] Remove IDC_BACK and IDC_FORWARD
Patch Set: Rebase, self review. Created 3 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/ui/ntp/new_tab_page_toolbar_controller.mm
diff --git a/ios/chrome/browser/ui/ntp/new_tab_page_toolbar_controller.mm b/ios/chrome/browser/ui/ntp/new_tab_page_toolbar_controller.mm
index deeb6f8fdac369aea0ded206daabc5f7918233c5..ff276324a79783154e4d8f32eb97b0d109cb6871 100644
--- a/ios/chrome/browser/ui/ntp/new_tab_page_toolbar_controller.mm
+++ b/ios/chrome/browser/ui/ntp/new_tab_page_toolbar_controller.mm
@@ -125,13 +125,18 @@ enum {
initWithTarget:self
action:@selector(handleLongPress:)];
[_backButton addGestureRecognizer:backLongPress];
+ [_backButton addTarget:self.dispatcher
+ action:@selector(goBack)
+ forControlEvents:UIControlEventTouchUpInside];
+
UILongPressGestureRecognizer* forwardLongPress =
[[UILongPressGestureRecognizer alloc]
initWithTarget:self
action:@selector(handleLongPress:)];
[_forwardButton addGestureRecognizer:forwardLongPress];
- [_backButton setTag:IDC_BACK];
- [_forwardButton setTag:IDC_FORWARD];
+ [_forwardButton addTarget:self.dispatcher
+ action:@selector(goForward)
+ forControlEvents:UIControlEventTouchUpInside];
[_omniboxFocuser addTarget:self
action:@selector(focusOmnibox:)
« no previous file with comments | « ios/chrome/browser/ui/ntp/new_tab_page_toolbar_controller.h ('k') | ios/chrome/browser/ui/omnibox_perftest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698