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

Unified Diff: chrome/browser/views/tabs/tab_overview_controller.h

Issue 132059: Changes tab overview to create a window the max size it can possibly... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/views/tabs/tab_overview_controller.h
===================================================================
--- chrome/browser/views/tabs/tab_overview_controller.h (revision 18731)
+++ chrome/browser/views/tabs/tab_overview_controller.h (working copy)
@@ -21,6 +21,13 @@
// TabOverviewController is responsible for showing a TabOverviewGrid and
// keeping it in sync with the TabStripModel of a browser.
+//
+// As tabs are added/removed from the TabStripModel the size and position
+// of the container animates. Ideally this would be done by changing the
+// bounds of the host window, but that proved janktastic. Instead the
+// size of the host window is created at the largest possible size the
+// window can be and the bounds of the container are changed during the
+// animation.
class TabOverviewController : public TabStripModelObserver {
public:
// Creates a TabOverviewController that will be shown on the monitor
@@ -85,10 +92,14 @@
// Updates the target and start bounds.
void UpdateStartAndTargetBounds();
- // Sets the bounds of the hosting window to |bounds|.
- void SetHostBounds(const gfx::Rect& bounds);
+ // Returns the bounds for the tab overview container based on the preferred
+ // size of the container. The returned value is the coordinates of the
+ // root view (container's parent).
+ // See comment above class description for more details.
+ gfx::Rect CalculateContainerBounds();
- // Returns the bounds for the window based on the current content.
+ // Returns the bounds needed for the host.
+ // See comment above class description for more details.
gfx::Rect CalculateHostBounds();
// The widget showing the view.
« no previous file with comments | « chrome/browser/views/tabs/tab_overview_container.cc ('k') | chrome/browser/views/tabs/tab_overview_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698