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

Unified Diff: ios/chrome/browser/ui/toolbar/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/toolbar/toolbar_controller.mm
diff --git a/ios/chrome/browser/ui/toolbar/toolbar_controller.mm b/ios/chrome/browser/ui/toolbar/toolbar_controller.mm
index 9ceeae4ac4308046ee588ca61fe4a70f1381f3f1..b45523725526877807446b2edb4781f3932a7f47 100644
--- a/ios/chrome/browser/ui/toolbar/toolbar_controller.mm
+++ b/ios/chrome/browser/ui/toolbar/toolbar_controller.mm
@@ -249,6 +249,7 @@ const LayoutOffset kButtonFadeOutXOffset = 10;
@synthesize shadowView = shadowView_;
@synthesize toolsPopupController = toolsPopupController_;
@synthesize style = style_;
+@synthesize dispatcher = dispatcher_;
- (void)setReadingListModel:(ReadingListModel*)readingListModel {
readingListModel_ = readingListModel;
@@ -558,9 +559,12 @@ const LayoutOffset kButtonFadeOutXOffset = 10;
[button addTarget:self
action:@selector(recordUserMetrics:)
forControlEvents:UIControlEventTouchUpInside];
- [button addTarget:button
- action:@selector(chromeExecuteCommand:)
- forControlEvents:UIControlEventTouchUpInside];
+ // Only register buttons with defined tags for -chromeExecuteCommand:
+ if (button.tag) {
+ [button addTarget:button
+ action:@selector(chromeExecuteCommand:)
+ forControlEvents:UIControlEventTouchUpInside];
+ }
}
- (CGRect)shareButtonAnchorRect {
« no previous file with comments | « ios/chrome/browser/ui/toolbar/toolbar_controller.h ('k') | ios/chrome/browser/ui/toolbar/web_toolbar_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698