OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "athena/home/public/home_card.h" | 5 #include "athena/home/public/home_card.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 #include <limits> | 8 #include <limits> |
9 | 9 |
10 #include "athena/common/container_priorities.h" | 10 #include "athena/common/container_priorities.h" |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 | 329 |
330 // views::View: | 330 // views::View: |
331 virtual void Layout() OVERRIDE { | 331 virtual void Layout() OVERRIDE { |
332 for (int i = 0; i < child_count(); ++i) { | 332 for (int i = 0; i < child_count(); ++i) { |
333 views::View* child = child_at(i); | 333 views::View* child = child_at(i); |
334 if (child->visible()) { | 334 if (child->visible()) { |
335 if (child == minimized_view_) { | 335 if (child == minimized_view_) { |
336 gfx::Rect minimized_bounds = bounds(); | 336 gfx::Rect minimized_bounds = bounds(); |
337 minimized_bounds.set_y( | 337 minimized_bounds.set_y( |
338 minimized_bounds.bottom() - kHomeCardMinimizedHeight); | 338 minimized_bounds.bottom() - kHomeCardMinimizedHeight); |
| 339 minimized_bounds.set_height(kHomeCardMinimizedHeight); |
339 child->SetBoundsRect(minimized_bounds); | 340 child->SetBoundsRect(minimized_bounds); |
340 } else { | 341 } else { |
341 child->SetBoundsRect(bounds()); | 342 child->SetBoundsRect(bounds()); |
342 } | 343 } |
343 } | 344 } |
344 } | 345 } |
345 } | 346 } |
346 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE { | 347 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE { |
347 if (!gesture_manager_ && | 348 if (!gesture_manager_ && |
348 event->type() == ui::ET_GESTURE_SCROLL_BEGIN) { | 349 event->type() == ui::ET_GESTURE_SCROLL_BEGIN) { |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
621 instance = NULL; | 622 instance = NULL; |
622 } | 623 } |
623 | 624 |
624 // static | 625 // static |
625 HomeCard* HomeCard::Get() { | 626 HomeCard* HomeCard::Get() { |
626 DCHECK(instance); | 627 DCHECK(instance); |
627 return instance; | 628 return instance; |
628 } | 629 } |
629 | 630 |
630 } // namespace athena | 631 } // namespace athena |
OLD | NEW |