OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_UI_VIEWS_FRAME_TOP_CONTAINER_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_TOP_CONTAINER_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_FRAME_TOP_CONTAINER_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_TOP_CONTAINER_VIEW_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "ui/views/view.h" | 10 #include "ui/views/view.h" |
11 | 11 |
12 class BrowserView; | 12 class BrowserView; |
13 | 13 |
14 // Container for the BrowserView's tab strip, toolbar, and sometimes bookmark | 14 // Container for the BrowserView's tab strip, toolbar, and sometimes bookmark |
15 // bar. In Chrome OS immersive fullscreen it stacks on top of other views in | 15 // bar. In Chrome OS immersive fullscreen it stacks on top of other views in |
16 // order to slide in and out over the web contents. It informs the immersive | 16 // order to slide in and out over the web contents. It informs the immersive |
17 // mode controller when its children lose focus to trigger a slide out. | 17 // mode controller when its children lose focus to trigger a slide out. |
18 class TopContainerView : public views::View { | 18 class TopContainerView : public views::View { |
19 public: | 19 public: |
20 explicit TopContainerView(BrowserView* browser_view); | 20 explicit TopContainerView(BrowserView* browser_view); |
21 virtual ~TopContainerView(); | 21 virtual ~TopContainerView(); |
22 | 22 |
| 23 // If the view is animating its bounds, returns the target bounds. Otheriwse, |
| 24 // returns the view's bounds. |
| 25 // TODO(pkotwicz): Investigate if GetBoundsInScreen() can return the view's |
| 26 // target bounds. |
| 27 gfx::Rect GetTargetBoundsInScreen() const; |
| 28 |
23 // views::View overrides: | 29 // views::View overrides: |
24 virtual gfx::Size GetPreferredSize() OVERRIDE; | 30 virtual gfx::Size GetPreferredSize() OVERRIDE; |
25 virtual std::string GetClassName() const OVERRIDE; | 31 virtual std::string GetClassName() const OVERRIDE; |
| 32 virtual void OnBoundsChanged(const gfx::Rect& bounds) OVERRIDE; |
26 virtual void PaintChildren(gfx::Canvas* canvas) OVERRIDE; | 33 virtual void PaintChildren(gfx::Canvas* canvas) OVERRIDE; |
27 | 34 |
28 private: | 35 private: |
29 // The parent of this view. Not owned. | 36 // The parent of this view. Not owned. |
30 BrowserView* browser_view_; | 37 BrowserView* browser_view_; |
31 | 38 |
32 DISALLOW_COPY_AND_ASSIGN(TopContainerView); | 39 DISALLOW_COPY_AND_ASSIGN(TopContainerView); |
33 }; | 40 }; |
34 | 41 |
35 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_TOP_CONTAINER_VIEW_H_ | 42 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_TOP_CONTAINER_VIEW_H_ |
OLD | NEW |