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

Side by Side Diff: ui/app_list/views/apps_grid_view.h

Issue 553763002: Clean up of tile sizing code for the Apps Grid View. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ares_fix_drag_point
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | ui/app_list/views/apps_grid_view.cc » ('j') | ui/app_list/views/apps_grid_view.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef UI_APP_LIST_VIEWS_APPS_GRID_VIEW_H_ 5 #ifndef UI_APP_LIST_VIEWS_APPS_GRID_VIEW_H_
6 #define UI_APP_LIST_VIEWS_APPS_GRID_VIEW_H_ 6 #define UI_APP_LIST_VIEWS_APPS_GRID_VIEW_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 // enclosed. 398 // enclosed.
399 // *|nearest_tile| and *|d_min| will be updated based on the calculation. 399 // *|nearest_tile| and *|d_min| will be updated based on the calculation.
400 // *|d_min| is the distance between |nearest_tile| and |drag_view_|. 400 // *|d_min| is the distance between |nearest_tile| and |drag_view_|.
401 void CalculateNearestTileForVertex( 401 void CalculateNearestTileForVertex(
402 const gfx::Point& vertex, Index* nearest_tile, int* d_min); 402 const gfx::Point& vertex, Index* nearest_tile, int* d_min);
403 403
404 // Returns the bounds of the tile in which |point| is enclosed if there 404 // Returns the bounds of the tile in which |point| is enclosed if there
405 // is a valid item sits on the tile. 405 // is a valid item sits on the tile.
406 gfx::Rect GetTileBoundsForPoint(const gfx::Point& point, Index* tile_index); 406 gfx::Rect GetTileBoundsForPoint(const gfx::Point& point, Index* tile_index);
407 407
408 // Gets the bounds of the tile located at |row| and |col| on current page. 408 // Returns the size of the entire tile grid.
409 gfx::Rect GetTileBounds(int row, int col) const; 409 gfx::Size GetTileGridSize() const;
410
411 // Gets the expected bounds of a tile located at |row| and |col| on current
Matt Giuca 2014/09/10 05:35:06 nit: on *the* current page.
calamity 2014/09/11 06:53:35 Done.
412 // page.
413 gfx::Rect GetExpectedTileBounds(int row, int col) const;
410 414
411 // Returns true if the slot of |index| is the last possible slot to drop 415 // Returns true if the slot of |index| is the last possible slot to drop
412 // an item, i.e. first empty slot next to the last item on the last page. 416 // an item, i.e. first empty slot next to the last item on the last page.
413 bool IsLastPossibleDropTarget(const Index& index) const; 417 bool IsLastPossibleDropTarget(const Index& index) const;
414 418
415 // Gets the item view located at |slot| on the current page. If there is 419 // Gets the item view located at |slot| on the current page. If there is
416 // no item located at |slot|, returns NULL. 420 // no item located at |slot|, returns NULL.
417 views::View* GetViewAtSlotOnCurrentPage(int slot); 421 views::View* GetViewAtSlotOnCurrentPage(int slot);
418 422
419 // Sets state of the view with |target_index| to |is_target_folder| for 423 // Sets state of the view with |target_index| to |is_target_folder| for
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 557
554 // True if the drag_view_ item is a folder item being dragged for reparenting. 558 // True if the drag_view_ item is a folder item being dragged for reparenting.
555 bool dragging_for_reparent_item_; 559 bool dragging_for_reparent_item_;
556 560
557 DISALLOW_COPY_AND_ASSIGN(AppsGridView); 561 DISALLOW_COPY_AND_ASSIGN(AppsGridView);
558 }; 562 };
559 563
560 } // namespace app_list 564 } // namespace app_list
561 565
562 #endif // UI_APP_LIST_VIEWS_APPS_GRID_VIEW_H_ 566 #endif // UI_APP_LIST_VIEWS_APPS_GRID_VIEW_H_
OLDNEW
« no previous file with comments | « no previous file | ui/app_list/views/apps_grid_view.cc » ('j') | ui/app_list/views/apps_grid_view.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698