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

Side by Side Diff: ash/wm/panel_window_event_filter.cc

Issue 11364062: ui: Remove TouchStatus in favour of EventResult. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/wm/panel_window_event_filter.h ('k') | ash/wm/shelf_layout_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/wm/panel_window_event_filter.h" 5 #include "ash/wm/panel_window_event_filter.h"
6 6
7 #include "ash/wm/window_util.h" 7 #include "ash/wm/window_util.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "ui/aura/client/aura_constants.h" 9 #include "ui/aura/client/aura_constants.h"
10 #include "ui/aura/root_window.h" 10 #include "ui/aura/root_window.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 layout_manager_->ToggleMinimize(dragged_panel_); 88 layout_manager_->ToggleMinimize(dragged_panel_);
89 dragged_panel_ = NULL; 89 dragged_panel_ = NULL;
90 return true; 90 return true;
91 } 91 }
92 return false; 92 return false;
93 default: 93 default:
94 return false; 94 return false;
95 } 95 }
96 } 96 }
97 97
98 ui::TouchStatus PanelWindowEventFilter::PreHandleTouchEvent( 98 ui::EventResult PanelWindowEventFilter::PreHandleTouchEvent(
99 aura::Window* target, 99 aura::Window* target,
100 ui::TouchEvent* event) { 100 ui::TouchEvent* event) {
101 return ui::TOUCH_STATUS_UNKNOWN; 101 return ui::ER_UNHANDLED;
102 } 102 }
103 103
104 ui::EventResult PanelWindowEventFilter::PreHandleGestureEvent( 104 ui::EventResult PanelWindowEventFilter::PreHandleGestureEvent(
105 aura::Window* target, ui::GestureEvent* event) { 105 aura::Window* target, ui::GestureEvent* event) {
106 return ui::ER_UNHANDLED; 106 return ui::ER_UNHANDLED;
107 } 107 }
108 108
109 109
110 bool PanelWindowEventFilter::HandleDrag(aura::Window* target, 110 bool PanelWindowEventFilter::HandleDrag(aura::Window* target,
111 ui::LocatedEvent* event) { 111 ui::LocatedEvent* event) {
112 gfx::Rect target_bounds = dragged_panel_->bounds(); 112 gfx::Rect target_bounds = dragged_panel_->bounds();
113 gfx::Point event_location_in_parent(event->location()); 113 gfx::Point event_location_in_parent(event->location());
114 aura::Window::ConvertPointToTarget(target, 114 aura::Window::ConvertPointToTarget(target,
115 target->parent(), 115 target->parent(),
116 &event_location_in_parent); 116 &event_location_in_parent);
117 target_bounds.set_x( 117 target_bounds.set_x(
118 event_location_in_parent.x() - drag_location_in_dragged_window_.x()); 118 event_location_in_parent.x() - drag_location_in_dragged_window_.x());
119 dragged_panel_->SetBounds(target_bounds); 119 dragged_panel_->SetBounds(target_bounds);
120 return true; 120 return true;
121 } 121 }
122 122
123 void PanelWindowEventFilter::FinishDrag() { 123 void PanelWindowEventFilter::FinishDrag() {
124 layout_manager_->FinishDragging(); 124 layout_manager_->FinishDragging();
125 drag_state_ = DRAG_NONE; 125 drag_state_ = DRAG_NONE;
126 dragged_panel_ = NULL; 126 dragged_panel_ = NULL;
127 } 127 }
128 128
129 } 129 }
130 } 130 }
OLDNEW
« no previous file with comments | « ash/wm/panel_window_event_filter.h ('k') | ash/wm/shelf_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698