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