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" |
11 #include "build/build_config.h" | 11 #include "build/build_config.h" |
12 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h" | 12 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h" |
13 #include "chrome/browser/ui/views/tab_icon_view_model.h" | 13 #include "chrome/browser/ui/views/tab_icon_view_model.h" |
14 #include "chrome/browser/ui/views/tabs/tab_strip_observer.h" | 14 #include "chrome/browser/ui/views/tabs/tab_strip_observer.h" |
15 | 15 |
16 #if !defined(OS_CHROMEOS) | 16 #if !defined(OS_CHROMEOS) |
17 #include "chrome/browser/ui/views/frame/avatar_button_manager.h" | 17 #include "chrome/browser/ui/views/frame/avatar_button_manager.h" |
18 #endif | 18 #endif |
19 | 19 |
20 class TabIconView; | 20 class TabIconView; |
21 class WebAppLeftHeaderView; | |
22 | 21 |
23 class BrowserNonClientFrameViewMus : public BrowserNonClientFrameView, | 22 class BrowserNonClientFrameViewMus : public BrowserNonClientFrameView, |
24 public TabIconViewModel, | 23 public TabIconViewModel, |
25 public TabStripObserver { | 24 public TabStripObserver { |
26 public: | 25 public: |
27 static const char kViewClassName[]; | 26 static const char kViewClassName[]; |
28 | 27 |
29 BrowserNonClientFrameViewMus(BrowserFrame* frame, BrowserView* browser_view); | 28 BrowserNonClientFrameViewMus(BrowserFrame* frame, BrowserView* browser_view); |
30 ~BrowserNonClientFrameViewMus() override; | 29 ~BrowserNonClientFrameViewMus() override; |
31 | 30 |
32 void Init(); | 31 void Init(); |
33 | 32 |
34 // BrowserNonClientFrameView: | 33 // BrowserNonClientFrameView: |
35 void OnBrowserViewInitViewsComplete() override; | 34 void OnBrowserViewInitViewsComplete() override; |
36 gfx::Rect GetBoundsForTabStrip(views::View* tabstrip) const override; | 35 gfx::Rect GetBoundsForTabStrip(views::View* tabstrip) const override; |
37 int GetTopInset(bool restored) const override; | 36 int GetTopInset(bool restored) const override; |
38 int GetThemeBackgroundXInset() const override; | 37 int GetThemeBackgroundXInset() const override; |
39 void UpdateThrobber(bool running) override; | 38 void UpdateThrobber(bool running) override; |
40 void UpdateToolbar() override; | |
41 views::View* GetLocationIconView() const override; | |
42 views::View* GetProfileSwitcherView() const override; | 39 views::View* GetProfileSwitcherView() const override; |
43 | 40 |
44 // views::NonClientFrameView: | 41 // views::NonClientFrameView: |
45 gfx::Rect GetBoundsForClientView() const override; | 42 gfx::Rect GetBoundsForClientView() const override; |
46 gfx::Rect GetWindowBoundsForClientBounds( | 43 gfx::Rect GetWindowBoundsForClientBounds( |
47 const gfx::Rect& client_bounds) const override; | 44 const gfx::Rect& client_bounds) const override; |
48 int NonClientHitTest(const gfx::Point& point) override; | 45 int NonClientHitTest(const gfx::Point& point) override; |
49 void GetWindowMask(const gfx::Size& size, gfx::Path* window_mask) override; | 46 void GetWindowMask(const gfx::Size& size, gfx::Path* window_mask) override; |
50 void ResetWindowControls() override; | 47 void ResetWindowControls() override; |
51 void UpdateWindowIcon() override; | 48 void UpdateWindowIcon() override; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 // Returns true if we should use a super short header with light bars instead | 82 // Returns true if we should use a super short header with light bars instead |
86 // of regular tabs. This header is used in immersive fullscreen when the | 83 // of regular tabs. This header is used in immersive fullscreen when the |
87 // top-of-window views are not revealed. | 84 // top-of-window views are not revealed. |
88 bool UseImmersiveLightbarHeaderStyle() const; | 85 bool UseImmersiveLightbarHeaderStyle() const; |
89 | 86 |
90 // Returns true if the header should be painted so that it looks the same as | 87 // Returns true if the header should be painted so that it looks the same as |
91 // the header used for packaged apps. Packaged apps use a different color | 88 // the header used for packaged apps. Packaged apps use a different color |
92 // scheme than browser windows. | 89 // scheme than browser windows. |
93 bool UsePackagedAppHeaderStyle() const; | 90 bool UsePackagedAppHeaderStyle() const; |
94 | 91 |
95 // Returns true if the header should be painted with a WebApp header style. | |
96 // The WebApp header style has a back button and title along with the usual | |
97 // accoutrements. | |
98 bool UseWebAppHeaderStyle() const; | |
99 | |
100 // Layout the incognito button. | 92 // Layout the incognito button. |
101 void LayoutIncognitoButton(); | 93 void LayoutIncognitoButton(); |
102 | 94 |
103 // Layout the profile switcher (if there is one). | 95 // Layout the profile switcher (if there is one). |
104 void LayoutProfileSwitcher(); | 96 void LayoutProfileSwitcher(); |
105 | 97 |
106 // Returns true if there is anything to paint. Some fullscreen windows do not | 98 // Returns true if there is anything to paint. Some fullscreen windows do not |
107 // need their frames painted. | 99 // need their frames painted. |
108 bool ShouldPaint() const; | 100 bool ShouldPaint() const; |
109 | 101 |
(...skipping 16 matching lines...) Expand all Loading... |
126 // Wrapper around the in-frame avatar switcher. | 118 // Wrapper around the in-frame avatar switcher. |
127 AvatarButtonManager profile_switcher_; | 119 AvatarButtonManager profile_switcher_; |
128 #endif | 120 #endif |
129 | 121 |
130 TabStrip* tab_strip_; | 122 TabStrip* tab_strip_; |
131 | 123 |
132 DISALLOW_COPY_AND_ASSIGN(BrowserNonClientFrameViewMus); | 124 DISALLOW_COPY_AND_ASSIGN(BrowserNonClientFrameViewMus); |
133 }; | 125 }; |
134 | 126 |
135 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_MUS_H_ | 127 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_MUS_H_ |
OLD | NEW |