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