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

Unified Diff: ash/shelf/shelf_bezel_event_filter.cc

Issue 2224653002: mash: Remove ash::ShelfGestureHandler and ui::ET_GESTURE_WIN8_EDGE_SWIPE (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 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/shelf/shelf_bezel_event_filter.h ('k') | ash/shelf/shelf_layout_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_bezel_event_filter.cc
diff --git a/ash/shelf/shelf_bezel_event_filter.cc b/ash/shelf/shelf_bezel_event_filter.cc
index e05239858a45b2b2cdcc4ff78f077a918fe91827..224180c7813851e7b49cbe43065fcd1d5ed86f89 100644
--- a/ash/shelf/shelf_bezel_event_filter.cc
+++ b/ash/shelf/shelf_bezel_event_filter.cc
@@ -9,12 +9,15 @@
#include "ui/aura/window.h"
#include "ui/display/display.h"
#include "ui/display/screen.h"
+#include "ui/gfx/geometry/point.h"
+#include "ui/gfx/geometry/rect.h"
#include "ui/wm/core/coordinate_conversion.h"
namespace ash {
-ShelfBezelEventFilter::ShelfBezelEventFilter(ShelfLayoutManager* shelf)
- : shelf_(shelf), in_touch_drag_(false) {
+ShelfBezelEventFilter::ShelfBezelEventFilter(
+ ShelfLayoutManager* shelf_layout_manager)
+ : shelf_layout_manager_(shelf_layout_manager), in_touch_drag_(false) {
Shell::GetInstance()->AddPreTargetHandler(this);
}
@@ -32,7 +35,7 @@ void ShelfBezelEventFilter::OnGestureEvent(ui::GestureEvent* event) {
if ((!screen.Contains(point_in_screen) &&
IsShelfOnBezel(screen, point_in_screen)) ||
in_touch_drag_) {
- if (gesture_handler_.ProcessGestureEvent(*event, target)) {
+ if (shelf_layout_manager_->ProcessGestureEvent(*event)) {
switch (event->type()) {
case ui::ET_GESTURE_SCROLL_BEGIN:
in_touch_drag_ = true;
@@ -51,9 +54,9 @@ void ShelfBezelEventFilter::OnGestureEvent(ui::GestureEvent* event) {
bool ShelfBezelEventFilter::IsShelfOnBezel(const gfx::Rect& screen,
const gfx::Point& point) const {
- return shelf_->SelectValueForShelfAlignment(point.y() >= screen.bottom(),
- point.x() <= screen.x(),
- point.x() >= screen.right());
+ return shelf_layout_manager_->SelectValueForShelfAlignment(
+ point.y() >= screen.bottom(), point.x() <= screen.x(),
+ point.x() >= screen.right());
}
} // namespace ash
« no previous file with comments | « ash/shelf/shelf_bezel_event_filter.h ('k') | ash/shelf/shelf_layout_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698