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 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "ui/app_list/app_list_constants.h" | 10 #include "ui/app_list/app_list_constants.h" |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 break; | 148 break; |
149 case SHOW_START_PAGE: | 149 case SHOW_START_PAGE: |
150 incoming_view_index = kIndexStartPage; | 150 incoming_view_index = kIndexStartPage; |
151 break; | 151 break; |
152 default: | 152 default: |
153 NOTREACHED(); | 153 NOTREACHED(); |
154 } | 154 } |
155 | 155 |
156 gfx::Rect incoming_target(rect); | 156 gfx::Rect incoming_target(rect); |
157 gfx::Rect outgoing_target(rect); | 157 gfx::Rect outgoing_target(rect); |
158 outgoing_target.set_y(-outgoing_target.height()); | 158 outgoing_target.set_x(-outgoing_target.width()); |
159 | 159 |
160 for (int i = 0; i < view_model_->view_size(); ++i) { | 160 for (int i = 0; i < view_model_->view_size(); ++i) { |
161 view_model_->set_ideal_bounds(i, | 161 view_model_->set_ideal_bounds(i, |
162 i == incoming_view_index ? incoming_target | 162 i == incoming_view_index ? incoming_target |
163 : outgoing_target); | 163 : outgoing_target); |
164 } | 164 } |
165 return; | 165 return; |
166 } | 166 } |
167 | 167 |
168 gfx::Rect container_frame(rect); | 168 gfx::Rect container_frame(rect); |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 if (!pagination_model_->has_transition()) { | 312 if (!pagination_model_->has_transition()) { |
313 pagination_model_->SelectPageRelative(offset > 0 ? -1 : 1, | 313 pagination_model_->SelectPageRelative(offset > 0 ? -1 : 1, |
314 true); | 314 true); |
315 } | 315 } |
316 event->SetHandled(); | 316 event->SetHandled(); |
317 event->StopPropagation(); | 317 event->StopPropagation(); |
318 } | 318 } |
319 } | 319 } |
320 | 320 |
321 } // namespace app_list | 321 } // namespace app_list |
OLD | NEW |