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

Issue 201061: [Mac] Restore focus to the tab contents when dismissing the find bar.... (Closed)

Created:
11 years, 3 months ago by rohitrao (ping after 24h)
Modified:
9 years, 7 months ago
Reviewers:
Avi (use Gerrit)
CC:
chromium-reviews_googlegroups.com, John Grabowski, pam+watch_chromium.org, Ben Goodger (Google)
Visibility:
Public.

Description

[Mac] Restore focus to the previously focused view when dismissing the find bar. If a result was found, restore focus to the tab contents. This allows for keyboard navigation using the find bar. BUG=http://crbug.com/12657 BUG=http://crbug.com/21374 TEST=See test case in bug 21374 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=26214

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+196 lines, -1 line) Patch
M chrome/browser/cocoa/find_bar_bridge.mm View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/cocoa/find_bar_cocoa_controller.h View 1 2 3 3 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/find_bar_cocoa_controller.mm View 1 2 3 4 chunks +23 lines, -0 lines 0 comments Download
A chrome/browser/cocoa/focus_tracker.h View 3 1 chunk +28 lines, -0 lines 0 comments Download
A chrome/browser/cocoa/focus_tracker.mm View 3 1 chunk +46 lines, -0 lines 2 comments Download
A chrome/browser/cocoa/focus_tracker_unittest.mm View 1 chunk +90 lines, -0 lines 0 comments Download
M chrome/chrome.gyp View 3 2 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
rohitrao (ping after 24h)
This is only a half-solution, since I don't save the originally focused view, but this ...
11 years, 3 months ago (2009-09-09 18:18:11 UTC) #1
rohitrao (ping after 24h)
On 2009/09/09 18:18:11, rohitrao wrote: > This is only a half-solution, since I don't save ...
11 years, 3 months ago (2009-09-09 19:53:43 UTC) #2
rohitrao (ping after 24h)
Avi, how does this save/restore focus code look to you? Does this look like something ...
11 years, 3 months ago (2009-09-10 16:33:33 UTC) #3
Avi (use Gerrit)
Overall, LG. http://codereview.chromium.org/201061/diff/10/6005 File chrome/browser/cocoa/focus_tracker.mm (right): http://codereview.chromium.org/201061/diff/10/6005#newcode5 Line 5: #import "chrome/browser/cocoa/focus_tracker.h" Interesting approach, and it ...
11 years, 3 months ago (2009-09-14 21:55:27 UTC) #4
rohitrao (ping after 24h)
http://codereview.chromium.org/201061/diff/10/6005 File chrome/browser/cocoa/focus_tracker.mm (right): http://codereview.chromium.org/201061/diff/10/6005#newcode5 Line 5: #import "chrome/browser/cocoa/focus_tracker.h" On 2009/09/14 21:55:27, Avi wrote: > ...
11 years, 3 months ago (2009-09-14 22:21:59 UTC) #5
Avi (use Gerrit)
11 years, 3 months ago (2009-09-15 13:53:45 UTC) #6
On 2009/09/14 22:21:59, rohitrao wrote:
> The code is also non-trivial and used in at least two different places, so I'd
> rather consolidate it.

Exactly.
 
> > In terms of usability, it seems kinda like a stack object (snapshot on
> > construction, restore on destruction). Do we want to try to make it C++ey
for
> > that?
> 
> I can play around with this some more.  The real trouble with
> restore-on-destruct is that I need to know the current window before I can
> restore (hence the restoreFocusInWindow: selector).  There are also some cases
> where I explicitly don't want to restore focus, so we'll need a good way to
> handle that as well.

Gotcha.

Looks good.

Powered by Google App Engine
This is Rietveld 408576698