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

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: Unset viewID before browser is set to nullptr. 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..d2334762639046de621a69430ee55946ff49645d 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
@@ -16,6 +16,7 @@
#import "chrome/browser/ui/cocoa/find_bar/find_bar_text_field_cell.h"
#import "chrome/browser/ui/cocoa/image_button_cell.h"
#import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h"
+#import "chrome/browser/ui/cocoa/view_id_util.h"
#include "chrome/browser/ui/find_bar/find_bar_controller.h"
#include "chrome/browser/ui/find_bar/find_tab_helper.h"
#include "chrome/grit/generated_resources.h"
@@ -97,6 +98,10 @@ const float kRightEdgeOffset = 25;
}
- (void)browserWillBeDestroyed {
+ view_id_util::UnsetID(previousButton_);
+ view_id_util::UnsetID(nextButton_);
+ view_id_util::UnsetID(closeButton_);
tapted 2016/02/10 00:56:01 I don't think this will fix the problem. I think
Mario Pistrich 2016/02/10 01:14:29 Thanks for clarifying, I've added them to the if s
+
// All animations should have been explicitly stopped before a tab is closed.
DCHECK(!showHideAnimation_.get());
DCHECK(!moveAnimation_.get());
@@ -135,6 +140,12 @@ const float kRightEdgeOffset = 25;
[[self view] setHidden:YES];
[self prepopulateText:[[FindPasteboard sharedInstance] findText]];
+
+ // 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);
}
- (IBAction)close:(id)sender {
« 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