Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2167)

Side by Side Diff: athena/home/home_card_impl.cc

Issue 464213006: Redesign the minimized home to follow the latest mock. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | athena/home/minimized_home.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | athena/home/minimized_home.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698