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

Unified Diff: ios/clean/chrome/browser/ui/tools/menu_view_controller.mm

Issue 2737563006: [ios] Adds support for Find in Page to the new architecture. (Closed)
Patch Set: Partially hook up the text field Created 3 years, 9 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/clean/chrome/browser/ui/tools/menu_view_controller.mm
diff --git a/ios/clean/chrome/browser/ui/tools/menu_view_controller.mm b/ios/clean/chrome/browser/ui/tools/menu_view_controller.mm
index 56c9b18d353c42d5b02629211c9eb053cab89882..12aec258279769b38f6700c393fcfd3e6c5878e7 100644
--- a/ios/clean/chrome/browser/ui/tools/menu_view_controller.mm
+++ b/ios/clean/chrome/browser/ui/tools/menu_view_controller.mm
@@ -45,6 +45,7 @@ const CGFloat kMenuItemHeight = 48;
@end
@implementation MenuViewController
+@synthesize dispatcher = _dispatcher;
@synthesize menuItems = _menuItems;
@synthesize toolbarOverflowStackView = _toolbarOverflowStackView;
@@ -72,6 +73,7 @@ const CGFloat kMenuItemHeight = 48;
_menuItems[6].title = @"Report an Issue";
_menuItems[7].title = @"Find in Page…";
+ _menuItems[7].action = @selector(showFindInPage);
_menuItems[8].title = @"Request Desktop Site";
@@ -110,7 +112,8 @@ const CGFloat kMenuItemHeight = 48;
action:@selector(closeToolsMenu:)
forControlEvents:UIControlEventTouchUpInside];
if (item.action) {
- [menuButton addTarget:nil
+ id target = (item.action == @selector(showFindInPage)) ? self : nil;
+ [menuButton addTarget:target
action:item.action
forControlEvents:UIControlEventTouchUpInside];
}
@@ -153,4 +156,8 @@ const CGFloat kMenuItemHeight = 48;
]];
}
+- (void)showFindInPage {
+ [self.dispatcher showFindInPage];
rohitrao (ping after 24h) 2017/03/14 01:10:37 13) Starting to convert the tools menu over to the
+}
+
@end

Powered by Google App Engine
This is Rietveld 408576698