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