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

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

Issue 1614523002: Remove old-avatar supervised user labels on non-Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_H_
7 7
8 #include "chrome/browser/profiles/profile_info_cache_observer.h" 8 #include "chrome/browser/profiles/profile_info_cache_observer.h"
9 #include "ui/views/window/non_client_view.h" 9 #include "ui/views/window/non_client_view.h"
10 10
11 #if defined(FRAME_AVATAR_BUTTON) 11 #if defined(FRAME_AVATAR_BUTTON)
12 #include "chrome/browser/ui/views/profiles/new_avatar_button.h" 12 #include "chrome/browser/ui/views/profiles/new_avatar_button.h"
13 #endif 13 #endif
14 14
15 #if defined(ENABLE_SUPERVISED_USERS)
16 class SupervisedUserAvatarLabel;
17 #endif
18 class AvatarMenuButton; 15 class AvatarMenuButton;
19 class BrowserFrame; 16 class BrowserFrame;
20 class BrowserView; 17 class BrowserView;
21 18
22 // A specialization of the NonClientFrameView object that provides additional 19 // A specialization of the NonClientFrameView object that provides additional
23 // Browser-specific methods. 20 // Browser-specific methods.
24 class BrowserNonClientFrameView : public views::NonClientFrameView, 21 class BrowserNonClientFrameView : public views::NonClientFrameView,
25 public ProfileInfoCacheObserver { 22 public ProfileInfoCacheObserver {
26 public: 23 public:
27 BrowserNonClientFrameView(BrowserFrame* frame, BrowserView* browser_view); 24 BrowserNonClientFrameView(BrowserFrame* frame, BrowserView* browser_view);
28 ~BrowserNonClientFrameView() override; 25 ~BrowserNonClientFrameView() override;
29 26
30 AvatarMenuButton* avatar_button() const { return avatar_button_; } 27 AvatarMenuButton* avatar_button() const { return avatar_button_; }
31 28
32 #if defined(FRAME_AVATAR_BUTTON) 29 #if defined(FRAME_AVATAR_BUTTON)
33 NewAvatarButton* new_avatar_button() const { return new_avatar_button_; } 30 NewAvatarButton* new_avatar_button() const { return new_avatar_button_; }
34 #endif 31 #endif
35 32
36 #if defined(ENABLE_SUPERVISED_USERS)
37 SupervisedUserAvatarLabel* supervised_user_avatar_label() const {
38 return supervised_user_avatar_label_;
39 }
40
41 void OnThemeChanged() override;
42 #endif
43
44 // Called when BrowserView creates all it's child views. 33 // Called when BrowserView creates all it's child views.
45 virtual void OnBrowserViewInitViewsComplete(); 34 virtual void OnBrowserViewInitViewsComplete();
46 35
47 // Retrieves the bounds, in non-client view coordinates within which the 36 // Retrieves the bounds, in non-client view coordinates within which the
48 // TabStrip should be laid out. 37 // TabStrip should be laid out.
49 virtual gfx::Rect GetBoundsForTabStrip(views::View* tabstrip) const = 0; 38 virtual gfx::Rect GetBoundsForTabStrip(views::View* tabstrip) const = 0;
50 39
51 // Returns the inset of the topmost view in the client view from the top of 40 // Returns the inset of the topmost view in the client view from the top of
52 // the non-client view. The topmost view depends on the window type. The 41 // the non-client view. The topmost view depends on the window type. The
53 // topmost view is the tab strip for tabbed browser windows, the toolbar for 42 // topmost view is the tab strip for tabbed browser windows, the toolbar for
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 107
119 // Draws a taskbar icon if avatars are enabled, erases it otherwise. 108 // Draws a taskbar icon if avatars are enabled, erases it otherwise.
120 void UpdateTaskbarDecoration(); 109 void UpdateTaskbarDecoration();
121 110
122 // The frame that hosts this view. 111 // The frame that hosts this view.
123 BrowserFrame* frame_; 112 BrowserFrame* frame_;
124 113
125 // The BrowserView hosted within this View. 114 // The BrowserView hosted within this View.
126 BrowserView* browser_view_; 115 BrowserView* browser_view_;
127 116
128 #if defined(ENABLE_SUPERVISED_USERS)
129 SupervisedUserAvatarLabel* supervised_user_avatar_label_;
130 #endif
131
132 #if defined(FRAME_AVATAR_BUTTON) 117 #if defined(FRAME_AVATAR_BUTTON)
133 // Menu button that displays the name of the active or guest profile. 118 // Menu button that displays the name of the active or guest profile.
134 // May be null and will not be displayed for off the record profiles. 119 // May be null and will not be displayed for off the record profiles.
135 NewAvatarButton* new_avatar_button_; 120 NewAvatarButton* new_avatar_button_;
136 #endif 121 #endif
137 122
138 // Menu button that displays the incognito icon. May be null for some frame 123 // Menu button that displays the incognito icon. May be null for some frame
139 // styles. TODO(anthonyvd): simplify/rename. 124 // styles. TODO(anthonyvd): simplify/rename.
140 AvatarMenuButton* avatar_button_; 125 AvatarMenuButton* avatar_button_;
141 }; 126 };
142 127
143 namespace chrome { 128 namespace chrome {
144 129
145 // Provided by a browser_non_client_frame_view_factory_*.cc implementation 130 // Provided by a browser_non_client_frame_view_factory_*.cc implementation
146 BrowserNonClientFrameView* CreateBrowserNonClientFrameView( 131 BrowserNonClientFrameView* CreateBrowserNonClientFrameView(
147 BrowserFrame* frame, BrowserView* browser_view); 132 BrowserFrame* frame, BrowserView* browser_view);
148 133
149 } // namespace chrome 134 } // namespace chrome
150 135
151 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_H_ 136 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/view_ids.h ('k') | chrome/browser/ui/views/frame/browser_non_client_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698