OLD | NEW |
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 CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "ui/views/window/non_client_view.h" | 9 #include "ui/views/window/non_client_view.h" |
10 | 10 |
11 class AvatarMenuButton; | 11 class AvatarMenuButton; |
12 class BrowserFrame; | 12 class BrowserFrame; |
13 class BrowserView; | 13 class BrowserView; |
14 | 14 |
15 // A specialization of the NonClientFrameView object that provides additional | 15 // A specialization of the NonClientFrameView object that provides additional |
16 // Browser-specific methods. | 16 // Browser-specific methods. |
17 class BrowserNonClientFrameView : public views::NonClientFrameView { | 17 class BrowserNonClientFrameView : public views::NonClientFrameView { |
18 public: | 18 public: |
| 19 // Insets around the tabstrip. |
| 20 struct TabStripInsets { |
| 21 TabStripInsets() : top(0), left(0), right(0) {} |
| 22 TabStripInsets(int top, int left, int right) |
| 23 : top(top), |
| 24 left(left), |
| 25 right(right) {} |
| 26 |
| 27 int top; |
| 28 int left; |
| 29 int right; |
| 30 }; |
| 31 |
19 BrowserNonClientFrameView(BrowserFrame* frame, BrowserView* browser_view); | 32 BrowserNonClientFrameView(BrowserFrame* frame, BrowserView* browser_view); |
20 virtual ~BrowserNonClientFrameView(); | 33 virtual ~BrowserNonClientFrameView(); |
21 | 34 |
22 AvatarMenuButton* avatar_button() const { return avatar_button_.get(); } | 35 AvatarMenuButton* avatar_button() const { return avatar_button_.get(); } |
23 | 36 |
24 // Returns the bounds within which the TabStrip should be laid out. | 37 // Returns the bounds within which the TabStrip should be laid out. |
25 virtual gfx::Rect GetBoundsForTabStrip(views::View* tabstrip) const = 0; | 38 virtual gfx::Rect GetBoundsForTabStrip(views::View* tabstrip) const = 0; |
26 | 39 |
27 // Returns the y coordinate within the window at which the tab strip begins. | 40 // Returns the TabStripInsets within the window at which the tab strip is |
28 // If |as_restored| is true, this is calculated as if we were in restored mode | 41 // positioned. If |as_restored| is true, this is calculated as if we were in |
29 // regardless of the current mode. This is used to correctly align theme | 42 // restored mode regardless of the current mode. |
30 // images. | 43 virtual TabStripInsets GetTabStripInsets(bool force_restored) const = 0; |
31 virtual int GetHorizontalTabStripVerticalOffset( | |
32 bool force_restored) const = 0; | |
33 | 44 |
34 // Updates the throbber. | 45 // Updates the throbber. |
35 virtual void UpdateThrobber(bool running) = 0; | 46 virtual void UpdateThrobber(bool running) = 0; |
36 | 47 |
37 // Overriden from views::View. | 48 // Overriden from views::View. |
38 virtual void VisibilityChanged(views::View* starting_from, | 49 virtual void VisibilityChanged(views::View* starting_from, |
39 bool is_visible) OVERRIDE; | 50 bool is_visible) OVERRIDE; |
40 | 51 |
41 protected: | 52 protected: |
42 BrowserView* browser_view() const { return browser_view_; } | 53 BrowserView* browser_view() const { return browser_view_; } |
(...skipping 16 matching lines...) Expand all Loading... |
59 | 70 |
60 namespace chrome { | 71 namespace chrome { |
61 | 72 |
62 // Provided by a browser_non_client_frame_view_factory_*.cc implementation | 73 // Provided by a browser_non_client_frame_view_factory_*.cc implementation |
63 BrowserNonClientFrameView* CreateBrowserNonClientFrameView( | 74 BrowserNonClientFrameView* CreateBrowserNonClientFrameView( |
64 BrowserFrame* frame, BrowserView* browser_view); | 75 BrowserFrame* frame, BrowserView* browser_view); |
65 | 76 |
66 } // namespace chrome | 77 } // namespace chrome |
67 | 78 |
68 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_H_ | 79 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_H_ |
OLD | NEW |