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

Unified Diff: ash/wm/toplevel_window_event_handler.cc

Issue 149063003: Check WindowDelegate in the methods which assume the target has the delegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/toplevel_window_event_handler.cc
diff --git a/ash/wm/toplevel_window_event_handler.cc b/ash/wm/toplevel_window_event_handler.cc
index 635860f356cf633efd1c0d37e74e688f5af6313b..264ceb5e6cb66110d352812daa056cec6075545b 100644
--- a/ash/wm/toplevel_window_event_handler.cc
+++ b/ash/wm/toplevel_window_event_handler.cc
@@ -352,7 +352,7 @@ void ToplevelWindowEventHandler::CompleteDrag(DragCompletionStatus status) {
void ToplevelWindowEventHandler::HandleMousePressed(
aura::Window* target,
ui::MouseEvent* event) {
- if (event->phase() != ui::EP_PRETARGET)
+ if (event->phase() != ui::EP_PRETARGET || !target->delegate())
return;
// We also update the current window component here because for the
@@ -417,7 +417,7 @@ void ToplevelWindowEventHandler::HandleMouseMoved(
// Shadow effects are applied after target handling. Note that we don't
// respect ER_HANDLED here right now since we have not had a reason to allow
// the target to cancel shadow rendering.
- if (event->phase() != ui::EP_POSTTARGET)
+ if (event->phase() != ui::EP_POSTTARGET || !target->delegate())
return;
// TODO(jamescook): Move the resize cursor update code into here from
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698