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

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

Issue 10911256: Change the way the ToplevelEventHandler is hooked up. It is now both a pre- and post-target event h… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 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
===================================================================
--- ash/wm/workspace/workspace_event_handler.cc (revision 156300)
+++ ash/wm/workspace/workspace_event_handler.cc (working copy)
@@ -12,6 +12,7 @@
#include "ui/aura/window.h"
#include "ui/aura/window_delegate.h"
#include "ui/base/events/event.h"
+#include "ui/base/events/event_functions.h"
#include "ui/base/hit_test.h"
#include "ui/compositor/scoped_layer_animation_settings.h"
#include "ui/gfx/screen.h"
@@ -80,6 +81,11 @@
case ui::ET_MOUSE_EXITED:
break;
case ui::ET_MOUSE_PRESSED: {
+ // Maximize behavior is implemented as post-target handling so the target
+ // can cancel it.
+ if (ui::EventCanceledDefaultHandling(*event))
+ return ToplevelWindowEventHandler::OnMouseEvent(event);
+
if (event->flags() & ui::EF_IS_DOUBLE_CLICK &&
target->delegate()->GetNonClientComponent(event->location()) ==
HTCAPTION) {

Powered by Google App Engine
This is Rietveld 408576698