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

Unified Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 11299219: Rework FocusManager as FocusClient. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 1 month 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 | « chrome/browser/ui/views/omnibox/omnibox_view_views.cc ('k') | content/shell/shell_stacking_client_ash.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_aura.cc
===================================================================
--- content/browser/renderer_host/render_widget_host_view_aura.cc (revision 169818)
+++ content/browser/renderer_host/render_widget_host_view_aura.cc (working copy)
@@ -31,6 +31,7 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/client/cursor_client.h"
+#include "ui/aura/client/focus_client.h"
#include "ui/aura/client/screen_position_client.h"
#include "ui/aura/client/stacking_client.h"
#include "ui/aura/client/tooltip_client.h"
@@ -505,10 +506,11 @@
}
void RenderWidgetHostViewAura::Focus() {
- // Make sure we have a FocusManager before attempting to Focus(). In some
+ // Make sure we have a FocusClient before attempting to Focus(). In some
// situations we may not yet be in a valid Window hierarchy (such as reloading
- // after out of memory discared the tab).
- if (window_->GetFocusManager())
+ // after out of memory discarded the tab).
+ aura::client::FocusClient* client = aura::client::GetFocusClient(window_);
+ if (client)
window_->Focus();
}
@@ -1505,7 +1507,8 @@
// Focus the window we were created from.
if (host_tracker_.get() && !host_tracker_->windows().empty()) {
aura::Window* host = *(host_tracker_->windows().begin());
- if (host->GetFocusManager())
+ aura::client::FocusClient* client = aura::client::GetFocusClient(host);
+ if (client)
host->Focus();
}
if (!in_shutdown_) {
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_view_views.cc ('k') | content/shell/shell_stacking_client_ash.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698