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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 1136143005: Send a Blur notification to the renderer if we receive a mouse exit for a window outside a popup. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | win8/delegate_execute/crash_server_init.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 330
331 if (event->type() != ui::ET_MOUSE_PRESSED && 331 if (event->type() != ui::ET_MOUSE_PRESSED &&
332 event->type() != ui::ET_TOUCH_PRESSED) { 332 event->type() != ui::ET_TOUCH_PRESSED) {
333 return; 333 return;
334 } 334 }
335 335
336 aura::Window* target = static_cast<aura::Window*>(event->target()); 336 aura::Window* target = static_cast<aura::Window*>(event->target());
337 if (target != window_ && 337 if (target != window_ &&
338 (!popup_parent_host_view_ || 338 (!popup_parent_host_view_ ||
339 target != popup_parent_host_view_->window_)) { 339 target != popup_parent_host_view_->window_)) {
340 // If we enter this code path it means that we did not receive any focus
341 // lost notifications for the popup window. Ensure that blink is aware
342 // of the fact that focus was lost for the host window by sending a Blur
343 // notification.
344 if (popup_parent_host_view_ && popup_parent_host_view_->host_)
345 popup_parent_host_view_->host_->Blur();
340 // Note: popup_parent_host_view_ may be NULL when there are multiple 346 // Note: popup_parent_host_view_ may be NULL when there are multiple
341 // popup children per view. See: RenderWidgetHostViewAura::InitAsPopup(). 347 // popup children per view. See: RenderWidgetHostViewAura::InitAsPopup().
342 Shutdown(); 348 Shutdown();
343 } 349 }
344 } 350 }
345 351
346 // We have to implement the WindowObserver interface on a separate object 352 // We have to implement the WindowObserver interface on a separate object
347 // because clang doesn't like implementing multiple interfaces that have 353 // because clang doesn't like implementing multiple interfaces that have
348 // methods with the same name. This object is owned by the 354 // methods with the same name. This object is owned by the
349 // RenderWidgetHostViewAura. 355 // RenderWidgetHostViewAura.
(...skipping 2425 matching lines...) Expand 10 before | Expand all | Expand 10 after
2775 2781
2776 //////////////////////////////////////////////////////////////////////////////// 2782 ////////////////////////////////////////////////////////////////////////////////
2777 // RenderWidgetHostViewBase, public: 2783 // RenderWidgetHostViewBase, public:
2778 2784
2779 // static 2785 // static
2780 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { 2786 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) {
2781 GetScreenInfoForWindow(results, NULL); 2787 GetScreenInfoForWindow(results, NULL);
2782 } 2788 }
2783 2789
2784 } // namespace content 2790 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | win8/delegate_execute/crash_server_init.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698