OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_LAYOUT_DELEGATE_
H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_LAYOUT_DELEGATE_
H_ |
| 7 |
| 8 namespace gfx { |
| 9 class Size; |
| 10 } |
| 11 |
| 12 // Delegate interface to control layout decisions without having to depend on |
| 13 // Browser{,Frame,View}. |
| 14 class OpaqueBrowserFrameViewLayoutDelegate { |
| 15 public: |
| 16 // Controls the visual placement of the window icon/title in non-tabstrip |
| 17 // mode. |
| 18 virtual bool ShouldShowWindowIcon() const = 0; |
| 19 virtual bool ShouldShowWindowTitle() const = 0; |
| 20 virtual string16 GetWindowTitle() const = 0; |
| 21 |
| 22 // Returns the size of the window icon. This can be platform dependent |
| 23 // because of differences in fonts, so its part of the interface. |
| 24 virtual int GetIconSize() const = 0; |
| 25 |
| 26 // Returns true if we should leave any offset at the frame caption. Typically |
| 27 // when the frame is maximized/full screen we want to leave no offset at the |
| 28 // top. |
| 29 virtual bool ShouldLeaveOffsetNearTopBorder() const = 0; |
| 30 |
| 31 // Returns the browser's minimum view size. Used because we need to calculate |
| 32 // the minimum size for the entire non-client area. |
| 33 virtual gfx::Size GetBrowserViewMinimumSize() const = 0; |
| 34 |
| 35 // Controls the visualization of the avatar |
| 36 virtual bool ShouldShowAvatar() const = 0; |
| 37 |
| 38 // We don't have a ThemeProvider in the layout manager, so plumb in the icon |
| 39 // source here. |
| 40 virtual gfx::ImageSkia GetOTRAvatarIcon() const = 0; |
| 41 |
| 42 // Controls window state. |
| 43 virtual bool IsMaximized() const = 0; |
| 44 virtual bool IsMinimized() const = 0; |
| 45 virtual bool IsFullscreen() const = 0; |
| 46 |
| 47 virtual bool IsTabStripVisible() const = 0; |
| 48 virtual int GetTabStripHeight() const = 0; |
| 49 |
| 50 // Various platforms need to be able to add more space to the |
| 51 // tabstrip. Windows 8 metro mode uses this to account for the window |
| 52 // switcher button. |
| 53 virtual int GetAdditionalReservedSpaceInTabStrip() const = 0; |
| 54 |
| 55 // Returns the tabstrips preferred size so the frame layout can work around |
| 56 // it. |
| 57 virtual gfx::Size GetTabstripPreferredSize() const = 0; |
| 58 |
| 59 protected: |
| 60 virtual ~OpaqueBrowserFrameViewLayoutDelegate() {} |
| 61 }; |
| 62 |
| 63 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_LAYOUT_DELEGA
TE_H_ |
OLD | NEW |