| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 CHROME_BROWSER_VIEWS_TABS_TAB_OVERVIEW_CONTAINER_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_TABS_TAB_OVERVIEW_CONTAINER_H_ |
| 6 #define CHROME_BROWSER_VIEWS_TABS_TAB_OVERVIEW_CONTAINER_H_ | 6 #define CHROME_BROWSER_VIEWS_TABS_TAB_OVERVIEW_CONTAINER_H_ |
| 7 | 7 |
| 8 #include "views/view.h" | 8 #include "views/view.h" |
| 9 | 9 |
| 10 class TabOverviewGrid; | 10 class TabOverviewGrid; |
| 11 | 11 |
| 12 // TabOverviewContainer contains TabOverviewGrid. TabOverviewContainer provides | 12 // TabOverviewContainer contains TabOverviewGrid. TabOverviewContainer provides |
| 13 // padding around the grid as well as maintaining a shape on the containing | 13 // padding around the grid. |
| 14 // widget. | |
| 15 class TabOverviewContainer : public views::View { | 14 class TabOverviewContainer : public views::View { |
| 16 public: | 15 public: |
| 17 TabOverviewContainer(); | 16 TabOverviewContainer(); |
| 18 virtual ~TabOverviewContainer(); | 17 virtual ~TabOverviewContainer(); |
| 19 | 18 |
| 20 // Sets the max size. This ends up being passed down to the grid after | 19 // Sets the max size. This ends up being passed down to the grid after |
| 21 // adjusting for our borders. | 20 // adjusting for our borders. |
| 22 void SetMaxSize(const gfx::Size& max_size); | 21 void SetMaxSize(const gfx::Size& max_size); |
| 23 | 22 |
| 24 // Updates the shape on the containing widget. |horizontal_center| gives the | |
| 25 // center of the window the parent window we're contained in is centered | |
| 26 // over. | |
| 27 void UpdateWidgetShape(int horizontal_center, int width, int height); | |
| 28 | |
| 29 // View overrides. | 23 // View overrides. |
| 30 virtual gfx::Size GetPreferredSize(); | 24 virtual gfx::Size GetPreferredSize(); |
| 31 virtual void Layout(); | 25 virtual void Layout(); |
| 32 virtual void Paint(gfx::Canvas* canvas); | 26 virtual void Paint(gfx::Canvas* canvas); |
| 33 virtual void DidChangeBounds(const gfx::Rect& previous, | |
| 34 const gfx::Rect& current); | |
| 35 | 27 |
| 36 private: | 28 private: |
| 37 TabOverviewGrid* GetTabOverviewGrid(); | 29 TabOverviewGrid* GetTabOverviewGrid(); |
| 38 | 30 |
| 39 DISALLOW_COPY_AND_ASSIGN(TabOverviewContainer); | 31 DISALLOW_COPY_AND_ASSIGN(TabOverviewContainer); |
| 40 }; | 32 }; |
| 41 | 33 |
| 42 #endif // CHROME_BROWSER_VIEWS_TABS_TAB_OVERVIEW_CONTAINER_H_ | 34 #endif // CHROME_BROWSER_VIEWS_TABS_TAB_OVERVIEW_CONTAINER_H_ |
| OLD | NEW |