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_OPAQUE_BROWSER_FRAME_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "chrome/browser/ui/view_ids.h" | 9 #include "chrome/browser/ui/view_ids.h" |
10 #include "chrome/browser/ui/views/frame/browser_frame.h" | 10 #include "chrome/browser/ui/views/frame/browser_frame.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 gfx::Size GetBrowserViewMinimumSize() const override; | 77 gfx::Size GetBrowserViewMinimumSize() const override; |
78 bool ShouldShowCaptionButtons() const override; | 78 bool ShouldShowCaptionButtons() const override; |
79 bool ShouldShowAvatar() const override; | 79 bool ShouldShowAvatar() const override; |
80 bool IsRegularOrGuestSession() const override; | 80 bool IsRegularOrGuestSession() const override; |
81 gfx::ImageSkia GetOTRAvatarIcon() const override; | 81 gfx::ImageSkia GetOTRAvatarIcon() const override; |
82 bool IsMaximized() const override; | 82 bool IsMaximized() const override; |
83 bool IsMinimized() const override; | 83 bool IsMinimized() const override; |
84 bool IsFullscreen() const override; | 84 bool IsFullscreen() const override; |
85 bool IsTabStripVisible() const override; | 85 bool IsTabStripVisible() const override; |
86 int GetTabStripHeight() const override; | 86 int GetTabStripHeight() const override; |
| 87 bool IsToolbarVisible() const override; |
87 gfx::Size GetTabstripPreferredSize() const override; | 88 gfx::Size GetTabstripPreferredSize() const override; |
88 | 89 |
89 protected: | 90 protected: |
90 views::ImageButton* minimize_button() const { return minimize_button_; } | 91 views::ImageButton* minimize_button() const { return minimize_button_; } |
91 views::ImageButton* maximize_button() const { return maximize_button_; } | 92 views::ImageButton* maximize_button() const { return maximize_button_; } |
92 views::ImageButton* restore_button() const { return restore_button_; } | 93 views::ImageButton* restore_button() const { return restore_button_; } |
93 views::ImageButton* close_button() const { return close_button_; } | 94 views::ImageButton* close_button() const { return close_button_; } |
94 | 95 |
95 // views::View: | 96 // views::View: |
96 void OnPaint(gfx::Canvas* canvas) override; | 97 void OnPaint(gfx::Canvas* canvas) override; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 | 136 |
136 // Returns true if the view should draw its own custom title bar. | 137 // Returns true if the view should draw its own custom title bar. |
137 bool ShouldShowWindowTitleBar() const; | 138 bool ShouldShowWindowTitleBar() const; |
138 | 139 |
139 // Paint various sub-components of this view. The *FrameBorder() functions | 140 // Paint various sub-components of this view. The *FrameBorder() functions |
140 // also paint the background of the titlebar area, since the top frame border | 141 // also paint the background of the titlebar area, since the top frame border |
141 // and titlebar background are a contiguous component. | 142 // and titlebar background are a contiguous component. |
142 void PaintRestoredFrameBorder(gfx::Canvas* canvas); | 143 void PaintRestoredFrameBorder(gfx::Canvas* canvas); |
143 void PaintMaximizedFrameBorder(gfx::Canvas* canvas); | 144 void PaintMaximizedFrameBorder(gfx::Canvas* canvas); |
144 void PaintToolbarBackground(gfx::Canvas* canvas); | 145 void PaintToolbarBackground(gfx::Canvas* canvas); |
145 void PaintRestoredClientEdge(gfx::Canvas* canvas); | 146 void PaintClientEdge(gfx::Canvas* canvas); |
146 | 147 |
147 // Our layout manager also calculates various bounds. | 148 // Our layout manager also calculates various bounds. |
148 OpaqueBrowserFrameViewLayout* layout_; | 149 OpaqueBrowserFrameViewLayout* layout_; |
149 | 150 |
150 // Window controls. | 151 // Window controls. |
151 views::ImageButton* minimize_button_; | 152 views::ImageButton* minimize_button_; |
152 views::ImageButton* maximize_button_; | 153 views::ImageButton* maximize_button_; |
153 views::ImageButton* restore_button_; | 154 views::ImageButton* restore_button_; |
154 views::ImageButton* close_button_; | 155 views::ImageButton* close_button_; |
155 | 156 |
156 // The window icon and title. | 157 // The window icon and title. |
157 TabIconView* window_icon_; | 158 TabIconView* window_icon_; |
158 views::Label* window_title_; | 159 views::Label* window_title_; |
159 | 160 |
160 // Background painter for the window frame. | 161 // Background painter for the window frame. |
161 scoped_ptr<views::FrameBackground> frame_background_; | 162 scoped_ptr<views::FrameBackground> frame_background_; |
162 | 163 |
163 // Observer that handles platform dependent configuration. | 164 // Observer that handles platform dependent configuration. |
164 scoped_ptr<OpaqueBrowserFrameViewPlatformSpecific> platform_observer_; | 165 scoped_ptr<OpaqueBrowserFrameViewPlatformSpecific> platform_observer_; |
165 | 166 |
166 DISALLOW_COPY_AND_ASSIGN(OpaqueBrowserFrameView); | 167 DISALLOW_COPY_AND_ASSIGN(OpaqueBrowserFrameView); |
167 }; | 168 }; |
168 | 169 |
169 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_H_ | 170 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_H_ |
OLD | NEW |