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

Unified Diff: chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm

Issue 1660273003: Keep focus on Find-In-Page buttons when using the keyboard to navigate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add view IDs for cocoa find bar UI. Created 4 years, 10 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
« no previous file with comments | « AUTHORS ('k') | chrome/browser/ui/view_ids.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm
diff --git a/chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm b/chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm
index 336fbdfd7052100d7bc9edda76a8b61a2ca0f5ea..5c7d884d2fcbc26c896eace1fe75f1f514fc5159 100644
--- a/chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm
+++ b/chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm
@@ -87,6 +87,12 @@ const float kRightEdgeOffset = 25;
name:kFindPasteboardChangedNotification
object:[FindPasteboard sharedInstance]];
browser_ = browser;
+
+ // Set ViewIDs for the buttons which don't have their dedicated class.
+ // ViewID of |findText_| is handled by itself.
+ view_id_util::SetID(previousButton_, VIEW_ID_FIND_IN_PAGE_PREVIOUS_BUTTON);
+ view_id_util::SetID(nextButton_, VIEW_ID_FIND_IN_PAGE_NEXT_BUTTON);
+ view_id_util::SetID(closeButton_, VIEW_ID_FIND_IN_PAGE_CLOSE_BUTTON);
}
return self;
}
@@ -102,6 +108,12 @@ const float kRightEdgeOffset = 25;
DCHECK(!moveAnimation_.get());
[[NSNotificationCenter defaultCenter] removeObserver:self];
browser_ = nullptr;
+
+ // Set ViewIDs for the buttons which don't have their dedicated class.
tapted 2016/02/09 02:41:24 This comment isn't right. I think it can just be o
+ // ViewID of |findText_| is handled by itself.
+ view_id_util::UnsetID(previousButton_);
+ view_id_util::UnsetID(nextButton_);
+ view_id_util::UnsetID(closeButton_);
}
- (void)setFindBarBridge:(FindBarBridge*)findBarBridge {
« no previous file with comments | « AUTHORS ('k') | chrome/browser/ui/view_ids.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698