Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Side by Side Diff: chrome/browser/ui/views/frame/browser_non_client_frame_view_mus.h

Issue 1608843002: Start untangling the avatar switcher from BrowserNonClientFrameView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@20160119-MacViewsBrowser-Compile
Patch Set: rename, enum class Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h" 10 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h"
11 #include "chrome/browser/ui/views/tab_icon_view_model.h" 11 #include "chrome/browser/ui/views/tab_icon_view_model.h"
12 #include "chrome/browser/ui/views/tabs/tab_strip_observer.h" 12 #include "chrome/browser/ui/views/tabs/tab_strip_observer.h"
13 #include "ui/views/controls/button/button.h"
14 13
15 class TabIconView; 14 class TabIconView;
16 class WebAppLeftHeaderView; 15 class WebAppLeftHeaderView;
17 16
18 namespace mus { 17 namespace mus {
19 class Window; 18 class Window;
20 } 19 }
21 20
22 namespace views { 21 namespace views {
23 class ImageButton; 22 class ImageButton;
24 class ToggleImageButton; 23 class ToggleImageButton;
25 } 24 }
26 25
27 class BrowserNonClientFrameViewMus : public BrowserNonClientFrameView, 26 class BrowserNonClientFrameViewMus : public BrowserNonClientFrameView,
28 public TabIconViewModel, 27 public TabIconViewModel,
29 public views::ButtonListener,
30 public TabStripObserver { 28 public TabStripObserver {
31 public: 29 public:
32 static const char kViewClassName[]; 30 static const char kViewClassName[];
33 31
34 BrowserNonClientFrameViewMus(BrowserFrame* frame, BrowserView* browser_view); 32 BrowserNonClientFrameViewMus(BrowserFrame* frame, BrowserView* browser_view);
35 ~BrowserNonClientFrameViewMus() override; 33 ~BrowserNonClientFrameViewMus() override;
36 34
37 void Init(); 35 void Init();
38 36
39 // BrowserNonClientFrameView: 37 // BrowserNonClientFrameView:
(...skipping 21 matching lines...) Expand all
61 void Layout() override; 59 void Layout() override;
62 const char* GetClassName() const override; 60 const char* GetClassName() const override;
63 void GetAccessibleState(ui::AXViewState* state) override; 61 void GetAccessibleState(ui::AXViewState* state) override;
64 gfx::Size GetMinimumSize() const override; 62 gfx::Size GetMinimumSize() const override;
65 void ChildPreferredSizeChanged(views::View* child) override; 63 void ChildPreferredSizeChanged(views::View* child) override;
66 64
67 // TabIconViewModel: 65 // TabIconViewModel:
68 bool ShouldTabIconViewAnimate() const override; 66 bool ShouldTabIconViewAnimate() const override;
69 gfx::ImageSkia GetFaviconForTabIconView() override; 67 gfx::ImageSkia GetFaviconForTabIconView() override;
70 68
71 // views::ButtonListener:
72 void ButtonPressed(views::Button* sender, const ui::Event& event) override;
73
74 protected: 69 protected:
75 // BrowserNonClientFrameView: 70 // BrowserNonClientFrameView:
76 void UpdateNewAvatarButtonImpl() override; 71 void UpdateNewAvatarButtonImpl() override;
77 72
78 private: 73 private:
79 mus::Window* mus_window(); 74 mus::Window* mus_window();
80 75
81 // Resets the client area on the mus::Window. 76 // Resets the client area on the mus::Window.
82 void UpdateClientArea(); 77 void UpdateClientArea();
83 78
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 132
138 // For popups, the window icon. 133 // For popups, the window icon.
139 TabIconView* window_icon_; 134 TabIconView* window_icon_;
140 135
141 TabStrip* tab_strip_; 136 TabStrip* tab_strip_;
142 137
143 DISALLOW_COPY_AND_ASSIGN(BrowserNonClientFrameViewMus); 138 DISALLOW_COPY_AND_ASSIGN(BrowserNonClientFrameViewMus);
144 }; 139 };
145 140
146 #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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698