| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "mash/shelf/shelf_view.h" | 5 #include "mash/shelf/shelf_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "mash/shelf/shelf_button.h" | 10 #include "mash/shelf/shelf_button.h" |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 view_->layer()->SetOpacity(1.0f); | 223 view_->layer()->SetOpacity(1.0f); |
| 224 } | 224 } |
| 225 | 225 |
| 226 private: | 226 private: |
| 227 ShelfView* shelf_view_; | 227 ShelfView* shelf_view_; |
| 228 views::View* view_; | 228 views::View* view_; |
| 229 | 229 |
| 230 DISALLOW_COPY_AND_ASSIGN(StartFadeAnimationDelegate); | 230 DISALLOW_COPY_AND_ASSIGN(StartFadeAnimationDelegate); |
| 231 }; | 231 }; |
| 232 | 232 |
| 233 ShelfView::ShelfView(mojo::ApplicationImpl* app) | 233 ShelfView::ShelfView(mojo::Shell* shell) |
| 234 : app_(app), | 234 : shell_(shell), |
| 235 model_(app), | 235 model_(shell), |
| 236 alignment_(SHELF_ALIGNMENT_BOTTOM), | 236 alignment_(SHELF_ALIGNMENT_BOTTOM), |
| 237 first_visible_index_(0), | 237 first_visible_index_(0), |
| 238 last_visible_index_(-1), | 238 last_visible_index_(-1), |
| 239 /* TODO(msw): Restore functionality: | 239 /* TODO(msw): Restore functionality: |
| 240 overflow_button_(nullptr), | 240 overflow_button_(nullptr), |
| 241 owner_overflow_bubble_(nullptr),*/ | 241 owner_overflow_bubble_(nullptr),*/ |
| 242 tooltip_(this), | 242 tooltip_(this), |
| 243 drag_pointer_(NONE), | 243 drag_pointer_(NONE), |
| 244 drag_view_(nullptr), | 244 drag_view_(nullptr), |
| 245 start_drag_index_(-1), | 245 start_drag_index_(-1), |
| (...skipping 1658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1904 break; | 1904 break; |
| 1905 case SHELF_ALIGNMENT_TOP: | 1905 case SHELF_ALIGNMENT_TOP: |
| 1906 distance = coordinate.y() - bounds.bottom(); | 1906 distance = coordinate.y() - bounds.bottom(); |
| 1907 break; | 1907 break; |
| 1908 } | 1908 } |
| 1909 return distance > 0 ? distance : 0; | 1909 return distance > 0 ? distance : 0; |
| 1910 } | 1910 } |
| 1911 | 1911 |
| 1912 } // namespace shelf | 1912 } // namespace shelf |
| 1913 } // namespace mash | 1913 } // namespace mash |
| OLD | NEW |