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

Unified Diff: ash/wm/workspace/workspace_event_handler.cc

Issue 810033010: Remove TransparentActivateWindowButton from Overview Mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
Index: ash/wm/workspace/workspace_event_handler.cc
diff --git a/ash/wm/workspace/workspace_event_handler.cc b/ash/wm/workspace/workspace_event_handler.cc
index afd017bb0e8bacea4a2de7bffe13d8844074a046..25d9ee0aa58227db9411c27f1058e195b864b713 100644
--- a/ash/wm/workspace/workspace_event_handler.cc
+++ b/ash/wm/workspace/workspace_event_handler.cc
@@ -24,6 +24,10 @@ WorkspaceEventHandler::~WorkspaceEventHandler() {
void WorkspaceEventHandler::OnMouseEvent(ui::MouseEvent* event) {
aura::Window* target = static_cast<aura::Window*>(event->target());
+
+ if (!target->delegate())
Nina 2015/01/09 15:43:49 Without the change, this code would crash if the u
+ return;
+
if (event->type() == ui::ET_MOUSE_PRESSED &&
event->IsOnlyLeftMouseButton() &&
((event->flags() &
@@ -82,6 +86,10 @@ void WorkspaceEventHandler::OnGestureEvent(ui::GestureEvent* event) {
return;
aura::Window* target = static_cast<aura::Window*>(event->target());
+
+ if (!target->delegate())
+ return;
+
int previous_target_component = click_component_;
click_component_ = target->delegate()->
GetNonClientComponent(event->location());

Powered by Google App Engine
This is Rietveld 408576698