OLD | NEW |
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 "ui/app_list/views/contents_view.h" | 5 #include "ui/app_list/views/contents_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "grit/ui_resources.h" | 11 #include "grit/ui_resources.h" |
12 #include "ui/app_list/app_list_constants.h" | 12 #include "ui/app_list/app_list_constants.h" |
13 #include "ui/app_list/app_list_switches.h" | 13 #include "ui/app_list/app_list_switches.h" |
14 #include "ui/app_list/app_list_view_delegate.h" | 14 #include "ui/app_list/app_list_view_delegate.h" |
15 #include "ui/app_list/views/app_list_folder_view.h" | 15 #include "ui/app_list/views/app_list_folder_view.h" |
16 #include "ui/app_list/views/app_list_main_view.h" | 16 #include "ui/app_list/views/app_list_main_view.h" |
17 #include "ui/app_list/views/apps_container_view.h" | 17 #include "ui/app_list/views/apps_container_view.h" |
18 #include "ui/app_list/views/apps_grid_view.h" | 18 #include "ui/app_list/views/apps_grid_view.h" |
19 #include "ui/app_list/views/contents_switcher_view.h" | 19 #include "ui/app_list/views/contents_switcher_view.h" |
20 #include "ui/app_list/views/search_result_list_view.h" | 20 #include "ui/app_list/views/search_result_list_view.h" |
21 #include "ui/app_list/views/start_page_view.h" | 21 #include "ui/app_list/views/start_page_view.h" |
22 #include "ui/base/resource/resource_bundle.h" | |
23 #include "ui/events/event.h" | 22 #include "ui/events/event.h" |
24 #include "ui/views/view_model.h" | 23 #include "ui/views/view_model.h" |
25 #include "ui/views/view_model_utils.h" | 24 #include "ui/views/view_model_utils.h" |
26 | 25 |
27 namespace app_list { | 26 namespace app_list { |
28 | 27 |
29 namespace { | 28 namespace { |
30 | 29 |
31 const int kMinMouseWheelToSwitchPage = 20; | 30 const int kMinMouseWheelToSwitchPage = 20; |
32 const int kMinScrollToSwitchPage = 20; | 31 const int kMinScrollToSwitchPage = 20; |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 if (std::abs(offset) > kMinScrollToSwitchPage) { | 397 if (std::abs(offset) > kMinScrollToSwitchPage) { |
399 if (!GetAppsPaginationModel()->has_transition()) { | 398 if (!GetAppsPaginationModel()->has_transition()) { |
400 GetAppsPaginationModel()->SelectPageRelative(offset > 0 ? -1 : 1, true); | 399 GetAppsPaginationModel()->SelectPageRelative(offset > 0 ? -1 : 1, true); |
401 } | 400 } |
402 event->SetHandled(); | 401 event->SetHandled(); |
403 event->StopPropagation(); | 402 event->StopPropagation(); |
404 } | 403 } |
405 } | 404 } |
406 | 405 |
407 } // namespace app_list | 406 } // namespace app_list |
OLD | NEW |