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

Unified Diff: content/renderer/render_view_impl.cc

Issue 1400003003: Move has_focus_ tracking from RenderWidget to RenderView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 2 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 | « content/renderer/render_view_impl.h ('k') | content/renderer/render_widget.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index ace7f67609514df4088e3a3c6cfba25ee5253a8a..fc2ebc2f17db041cc95941d731a99ae048055d91 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -641,6 +641,7 @@ RenderViewImpl::RenderViewImpl(CompositorDependencies* compositor_deps,
#if defined(OS_ANDROID)
top_controls_constraints_(TOP_CONTROLS_STATE_BOTH),
#endif
+ has_focus_(false),
has_scrolled_focused_editable_node_into_rect_(false),
main_render_frame_(nullptr),
speech_recognition_dispatcher_(NULL),
@@ -3074,6 +3075,8 @@ void RenderViewImpl::OnSetFocus(bool enable) {
// This message must always be received when the main frame is a
// WebLocalFrame.
CHECK(webview()->mainFrame()->isWebLocalFrame());
+
+ has_focus_ = enable;
RenderWidget::OnSetFocus(enable);
#if defined(ENABLE_PLUGINS)
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | content/renderer/render_widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698