Index: ui/app_list/views/apps_grid_view.cc |
diff --git a/ui/app_list/views/apps_grid_view.cc b/ui/app_list/views/apps_grid_view.cc |
index 9acafda03ed81728577f8b60b4562f3a0fdf151c..acd5d2e087bd47c0b7845d1af3bc3471297f0342 100644 |
--- a/ui/app_list/views/apps_grid_view.cc |
+++ b/ui/app_list/views/apps_grid_view.cc |
@@ -1652,22 +1652,30 @@ void AppsGridView::MaybeStartPageFlipTimer(const gfx::Point& drag_point) { |
StopPageFlipTimer(); |
int new_page_flip_target = -1; |
- if (page_switcher_view_ && |
- page_switcher_view_->bounds().Contains(drag_point)) { |
- gfx::Point page_switcher_point(drag_point); |
- views::View::ConvertPointToTarget(this, page_switcher_view_, |
- &page_switcher_point); |
- new_page_flip_target = |
- page_switcher_view_->GetPageForPoint(page_switcher_point); |
- } |
+ // The drag zones are at the top and bottom of the experimental app list and |
+ // on the sides and page switcher of the normal app list. |
+ if (switches::IsExperimentalAppListEnabled()) { |
Matt Giuca
2014/09/02 08:26:34
This should be:
if (pagination_controller_->scrol
calamity
2014/09/03 11:25:36
Done.
|
+ if (drag_point.y() < kPageFlipZoneSize) |
Matt Giuca
2014/09/02 08:26:34
I'm confused as to why this code is completely dif
Matt Giuca
2014/09/03 08:02:18
You explained this to me, so ignore it.
calamity
2014/09/03 11:25:36
Acknowledged.
|
+ new_page_flip_target = pagination_model_.selected_page() - 1; |
+ else if (drag_point.y() > height() - kPageFlipZoneSize) |
+ new_page_flip_target = pagination_model_.selected_page() + 1; |
+ } else { |
+ if (page_switcher_view_->bounds().Contains(drag_point)) { |
+ gfx::Point page_switcher_point(drag_point); |
+ views::View::ConvertPointToTarget( |
+ this, page_switcher_view_, &page_switcher_point); |
+ new_page_flip_target = |
+ page_switcher_view_->GetPageForPoint(page_switcher_point); |
+ } |
- // TODO(xiyuan): Fix this for RTL. |
- if (new_page_flip_target == -1 && drag_point.x() < kPageFlipZoneSize) |
- new_page_flip_target = pagination_model_.selected_page() - 1; |
+ // TODO(xiyuan): Fix this for RTL. |
+ if (new_page_flip_target == -1 && drag_point.x() < kPageFlipZoneSize) |
+ new_page_flip_target = pagination_model_.selected_page() - 1; |
- if (new_page_flip_target == -1 && |
- drag_point.x() > width() - kPageFlipZoneSize) { |
- new_page_flip_target = pagination_model_.selected_page() + 1; |
+ if (new_page_flip_target == -1 && |
+ drag_point.x() > width() - kPageFlipZoneSize) { |
+ new_page_flip_target = pagination_model_.selected_page() + 1; |
+ } |
} |
if (new_page_flip_target == page_flip_target_) |