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

Unified Diff: chrome/browser/views/frame/browser_view.cc

Issue 27175: Fix toolbar keyboard focus (shift-alt-t), which was broken by me, and toolbar... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 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 | « no previous file | chrome/browser/views/toolbar_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/frame/browser_view.cc
===================================================================
--- chrome/browser/views/frame/browser_view.cc (revision 10372)
+++ chrome/browser/views/frame/browser_view.cc (working copy)
@@ -51,6 +51,7 @@
#include "chrome/views/hwnd_notification_source.h"
#include "chrome/views/native_scroll_bar.h"
#include "chrome/views/non_client_view.h"
+#include "chrome/views/root_view.h"
#include "chrome/views/view.h"
#include "chrome/views/window.h"
#include "grit/chromium_strings.h"
@@ -682,7 +683,10 @@
// Do not restore the button that previously had accessibility focus, if
// focus is set by using the toolbar focus keyboard shortcut.
toolbar_->set_acc_focused_view(NULL);
- toolbar_->RequestFocus();
+ // HACK: Do not use RequestFocus() here, as the toolbar is not marked as
+ // "focusable". Instead bypass the sanity check in RequestFocus() and just
+ // force it to focus, which will do the right thing.
+ GetRootView()->FocusView(toolbar_);
}
void BrowserView::DestroyBrowser() {
« no previous file with comments | « no previous file | chrome/browser/views/toolbar_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698