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

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

Issue 9609016: Initial cut at multi-window resize code. There's still some TODOs, but (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup Created 8 years, 9 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_filter.cc
diff --git a/ash/wm/workspace/workspace_event_filter.cc b/ash/wm/workspace/workspace_event_filter.cc
index ae4ae98a87a28f4fb9c566c042ac524393e41496..a137b15374b9e396a56bff89ec3255eb7bdbc3bd 100644
--- a/ash/wm/workspace/workspace_event_filter.cc
+++ b/ash/wm/workspace/workspace_event_filter.cc
@@ -61,6 +61,14 @@ WorkspaceEventFilter::~WorkspaceEventFilter() {
bool WorkspaceEventFilter::PreHandleMouseEvent(aura::Window* target,
aura::MouseEvent* event) {
switch (event->type()) {
+ case ui::ET_MOUSE_MOVED: {
+ int component =
+ target->delegate()->GetNonClientComponent(event->location());
+ multi_window_resize_controller_.set_grid_size(grid_size());
+ multi_window_resize_controller_.Show(target, component,
+ event->location());
+ break;
+ }
case ui::ET_MOUSE_ENTERED:
UpdateHoveredWindow(wm::GetActivatableWindow(target));
break;
@@ -69,6 +77,7 @@ bool WorkspaceEventFilter::PreHandleMouseEvent(aura::Window* target,
UpdateHoveredWindow(NULL);
break;
case ui::ET_MOUSE_PRESSED:
+ multi_window_resize_controller_.Hide();
HandleVerticalResizeDoubleClick(target, event);
break;
default:
@@ -94,7 +103,8 @@ WindowResizer* WorkspaceEventFilter::CreateWindowResizer(
return NULL;
}
return WorkspaceWindowResizer::Create(
- window, point, window_component, grid_size());
+ window, point, window_component, grid_size(),
+ std::vector<aura::Window*>());
}
void WorkspaceEventFilter::UpdateHoveredWindow(

Powered by Google App Engine
This is Rietveld 408576698