OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_MUS_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_MUS_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_MUS_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_MUS_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 void TabStripMaxXChanged(TabStrip* tab_strip) override; | 70 void TabStripMaxXChanged(TabStrip* tab_strip) override; |
71 void TabStripDeleted(TabStrip* tab_strip) override; | 71 void TabStripDeleted(TabStrip* tab_strip) override; |
72 | 72 |
73 // Distance between the left edge of the NonClientFrameView and the tab strip. | 73 // Distance between the left edge of the NonClientFrameView and the tab strip. |
74 int GetTabStripLeftInset() const; | 74 int GetTabStripLeftInset() const; |
75 | 75 |
76 // Distance between the right edge of the NonClientFrameView and the tab | 76 // Distance between the right edge of the NonClientFrameView and the tab |
77 // strip. | 77 // strip. |
78 int GetTabStripRightInset() const; | 78 int GetTabStripRightInset() const; |
79 | 79 |
80 // Returns true if we should use a super short header with light bars instead | |
81 // of regular tabs. This header is used in immersive fullscreen when the | |
82 // top-of-window views are not revealed. | |
83 bool UseImmersiveLightbarHeaderStyle() const; | |
84 | |
85 // Returns true if the header should be painted so that it looks the same as | 80 // Returns true if the header should be painted so that it looks the same as |
86 // the header used for packaged apps. Packaged apps use a different color | 81 // the header used for packaged apps. Packaged apps use a different color |
87 // scheme than browser windows. | 82 // scheme than browser windows. |
88 bool UsePackagedAppHeaderStyle() const; | 83 bool UsePackagedAppHeaderStyle() const; |
89 | 84 |
90 // Layout the incognito button. | 85 // Layout the incognito button. |
91 void LayoutIncognitoButton(); | 86 void LayoutIncognitoButton(); |
92 | 87 |
93 // Layout the profile switcher (if there is one). | 88 // Layout the profile switcher (if there is one). |
94 void LayoutProfileSwitcher(); | 89 void LayoutProfileSwitcher(); |
95 | 90 |
96 // Returns true if there is anything to paint. Some fullscreen windows do not | 91 // Returns true if there is anything to paint. Some fullscreen windows do not |
97 // need their frames painted. | 92 // need their frames painted. |
98 bool ShouldPaint() const; | 93 bool ShouldPaint() const; |
99 | 94 |
100 // Paints the header background when the frame is in immersive fullscreen and | |
101 // tab light bar is visible. | |
102 void PaintImmersiveLightbarStyleHeader(gfx::Canvas* canvas); | |
103 | |
104 void PaintToolbarBackground(gfx::Canvas* canvas); | 95 void PaintToolbarBackground(gfx::Canvas* canvas); |
105 | 96 |
106 // Draws the line under the header for windows without a toolbar and not using | 97 // Draws the line under the header for windows without a toolbar and not using |
107 // the packaged app header style. | 98 // the packaged app header style. |
108 void PaintContentEdge(gfx::Canvas* canvas); | 99 void PaintContentEdge(gfx::Canvas* canvas); |
109 | 100 |
110 // TODO(sky): Figure out how to support WebAppLeftHeaderView. | 101 // TODO(sky): Figure out how to support WebAppLeftHeaderView. |
111 | 102 |
112 // For popups, the window icon. | 103 // For popups, the window icon. |
113 TabIconView* window_icon_; | 104 TabIconView* window_icon_; |
114 | 105 |
115 #if !defined(OS_CHROMEOS) | 106 #if !defined(OS_CHROMEOS) |
116 // Wrapper around the in-frame avatar switcher. | 107 // Wrapper around the in-frame avatar switcher. |
117 AvatarButtonManager profile_switcher_; | 108 AvatarButtonManager profile_switcher_; |
118 #endif | 109 #endif |
119 | 110 |
120 TabStrip* tab_strip_; | 111 TabStrip* tab_strip_; |
121 | 112 |
122 DISALLOW_COPY_AND_ASSIGN(BrowserNonClientFrameViewMus); | 113 DISALLOW_COPY_AND_ASSIGN(BrowserNonClientFrameViewMus); |
123 }; | 114 }; |
124 | 115 |
125 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_MUS_H_ | 116 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_MUS_H_ |
OLD | NEW |