| 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; | 21 class WebAppLeftHeaderView; |
| 22 | 22 |
| 23 namespace ui { |
| 24 class Window; |
| 25 } |
| 26 |
| 23 class BrowserNonClientFrameViewMus : public BrowserNonClientFrameView, | 27 class BrowserNonClientFrameViewMus : public BrowserNonClientFrameView, |
| 24 public TabIconViewModel, | 28 public TabIconViewModel, |
| 25 public TabStripObserver { | 29 public TabStripObserver { |
| 26 public: | 30 public: |
| 27 static const char kViewClassName[]; | 31 static const char kViewClassName[]; |
| 28 | 32 |
| 29 BrowserNonClientFrameViewMus(BrowserFrame* frame, BrowserView* browser_view); | 33 BrowserNonClientFrameViewMus(BrowserFrame* frame, BrowserView* browser_view); |
| 30 ~BrowserNonClientFrameViewMus() override; | 34 ~BrowserNonClientFrameViewMus() override; |
| 31 | 35 |
| 32 void Init(); | 36 void Init(); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 61 | 65 |
| 62 // TabIconViewModel: | 66 // TabIconViewModel: |
| 63 bool ShouldTabIconViewAnimate() const override; | 67 bool ShouldTabIconViewAnimate() const override; |
| 64 gfx::ImageSkia GetFaviconForTabIconView() override; | 68 gfx::ImageSkia GetFaviconForTabIconView() override; |
| 65 | 69 |
| 66 protected: | 70 protected: |
| 67 // BrowserNonClientFrameView: | 71 // BrowserNonClientFrameView: |
| 68 void UpdateProfileIcons() override; | 72 void UpdateProfileIcons() override; |
| 69 | 73 |
| 70 private: | 74 private: |
| 71 // Resets the client area of the WindowTreeHostMus. | 75 ui::Window* mus_window(); |
| 76 |
| 77 // Resets the client area on the ui::Window. |
| 72 void UpdateClientArea(); | 78 void UpdateClientArea(); |
| 73 | 79 |
| 74 // TabStripObserver: | 80 // TabStripObserver: |
| 75 void TabStripMaxXChanged(TabStrip* tab_strip) override; | 81 void TabStripMaxXChanged(TabStrip* tab_strip) override; |
| 76 void TabStripDeleted(TabStrip* tab_strip) override; | 82 void TabStripDeleted(TabStrip* tab_strip) override; |
| 77 | 83 |
| 78 // Distance between the left edge of the NonClientFrameView and the tab strip. | 84 // Distance between the left edge of the NonClientFrameView and the tab strip. |
| 79 int GetTabStripLeftInset() const; | 85 int GetTabStripLeftInset() const; |
| 80 | 86 |
| 81 // Distance between the right edge of the NonClientFrameView and the tab | 87 // Distance between the right edge of the NonClientFrameView and the tab |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 // Wrapper around the in-frame avatar switcher. | 132 // Wrapper around the in-frame avatar switcher. |
| 127 AvatarButtonManager profile_switcher_; | 133 AvatarButtonManager profile_switcher_; |
| 128 #endif | 134 #endif |
| 129 | 135 |
| 130 TabStrip* tab_strip_; | 136 TabStrip* tab_strip_; |
| 131 | 137 |
| 132 DISALLOW_COPY_AND_ASSIGN(BrowserNonClientFrameViewMus); | 138 DISALLOW_COPY_AND_ASSIGN(BrowserNonClientFrameViewMus); |
| 133 }; | 139 }; |
| 134 | 140 |
| 135 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_MUS_H_ | 141 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_MUS_H_ |
| OLD | NEW |