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

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

Issue 2901663003: chromeos: converts WindowState to aura::Window (Closed)
Patch Set: feedback Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/wm/window_util.h ('k') | ash/wm/workspace/workspace_layout_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 433ee9a0bcb98ef1ccb2ee57caae7b272ef90452..0643a52bf5c88053f29815ac9a0466b3d46d5459 100644
--- a/ash/wm/workspace/workspace_event_handler.cc
+++ b/ash/wm/workspace/workspace_event_handler.cc
@@ -8,6 +8,8 @@
#include "ash/wm/window_state.h"
#include "ash/wm/wm_event.h"
#include "ash/wm_window.h"
+#include "ui/aura/window.h"
+#include "ui/aura/window_delegate.h"
#include "ui/base/hit_test.h"
#include "ui/events/event.h"
@@ -97,9 +99,10 @@ void WorkspaceEventHandler::OnGestureEvent(ui::GestureEvent* event,
void WorkspaceEventHandler::HandleVerticalResizeDoubleClick(
wm::WindowState* target_state,
ui::MouseEvent* event) {
- WmWindow* target = target_state->window();
- if (event->flags() & ui::EF_IS_DOUBLE_CLICK) {
- int component = target->GetNonClientComponent(event->location());
+ aura::Window* target = target_state->window();
+ if ((event->flags() & ui::EF_IS_DOUBLE_CLICK) != 0 && target->delegate()) {
+ const int component =
+ target->delegate()->GetNonClientComponent(event->location());
if (component == HTBOTTOM || component == HTTOP) {
ShellPort::Get()->RecordUserMetricsAction(
UMA_TOGGLE_SINGLE_AXIS_MAXIMIZE_BORDER_CLICK);
« no previous file with comments | « ash/wm/window_util.h ('k') | ash/wm/workspace/workspace_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698