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

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

Issue 7155015: Store profile avatar to preferences (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' Created 9 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_OPAQUE_BROWSER_FRAME_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/prefs/pref_member.h"
11 #include "chrome/browser/ui/views/frame/browser_frame.h" 10 #include "chrome/browser/ui/views/frame/browser_frame.h"
12 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h" 11 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h"
13 #include "chrome/browser/ui/views/tab_icon_view.h" 12 #include "chrome/browser/ui/views/tab_icon_view.h"
13 #include "content/common/notification_observer.h"
14 #include "content/common/notification_registrar.h"
14 #include "views/controls/button/button.h" 15 #include "views/controls/button/button.h"
15 #include "views/window/non_client_view.h" 16 #include "views/window/non_client_view.h"
16 17
17 class BrowserView; 18 class BrowserView;
18 namespace gfx { 19 namespace gfx {
19 class Font; 20 class Font;
20 } 21 }
21 class AvatarMenuButton; 22 class AvatarMenuButton;
22 class TabContents; 23 class TabContents;
23 namespace views { 24 namespace views {
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 SkColor GetFrameColor() const; 151 SkColor GetFrameColor() const;
151 152
152 // Layout various sub-components of this view. 153 // Layout various sub-components of this view.
153 void LayoutWindowControls(); 154 void LayoutWindowControls();
154 void LayoutTitleBar(); 155 void LayoutTitleBar();
155 void LayoutAvatar(); 156 void LayoutAvatar();
156 157
157 // Returns the bounds of the client area for the specified view size. 158 // Returns the bounds of the client area for the specified view size.
158 gfx::Rect CalculateClientAreaBounds(int width, int height) const; 159 gfx::Rect CalculateClientAreaBounds(int width, int height) const;
159 160
160 // Receive notifications when the user's Google services user name changes. 161 // Updates the title and icon of the avatar button.
161 void RegisterLoginNotifications(); 162 void UpdateAvatarInfo();
162 163
163 // The layout rect of the title, if visible. 164 // The layout rect of the title, if visible.
164 gfx::Rect title_bounds_; 165 gfx::Rect title_bounds_;
165 166
166 // The layout rect of the avatar icon, if visible. 167 // The layout rect of the avatar icon, if visible.
167 gfx::Rect avatar_bounds_; 168 gfx::Rect avatar_bounds_;
168 169
169 // Window controls. 170 // Window controls.
170 views::ImageButton* minimize_button_; 171 views::ImageButton* minimize_button_;
171 views::ImageButton* maximize_button_; 172 views::ImageButton* maximize_button_;
172 views::ImageButton* restore_button_; 173 views::ImageButton* restore_button_;
173 views::ImageButton* close_button_; 174 views::ImageButton* close_button_;
174 175
175 // The Window icon. 176 // The Window icon.
176 TabIconView* window_icon_; 177 TabIconView* window_icon_;
177 178
178 // The frame that hosts this view. 179 // The frame that hosts this view.
179 BrowserFrame* frame_; 180 BrowserFrame* frame_;
180 181
181 // The BrowserView hosted within this View. 182 // The BrowserView hosted within this View.
182 BrowserView* browser_view_; 183 BrowserView* browser_view_;
183 184
184 // The bounds of the ClientView. 185 // The bounds of the ClientView.
185 gfx::Rect client_view_bounds_; 186 gfx::Rect client_view_bounds_;
186 187
187 // Menu button that displays that either the incognito icon or the profile 188 // Menu button that displays that either the incognito icon or the profile
188 // icon. 189 // icon.
189 scoped_ptr<AvatarMenuButton> avatar_button_; 190 scoped_ptr<AvatarMenuButton> avatar_button_;
190 191
191 // The Google services user name associated with this BrowserView's profile. 192 NotificationRegistrar registrar_;
192 StringPrefMember username_pref_;
193 193
194 DISALLOW_COPY_AND_ASSIGN(OpaqueBrowserFrameView); 194 DISALLOW_COPY_AND_ASSIGN(OpaqueBrowserFrameView);
195 }; 195 };
196 196
197 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_H_ 197 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/glass_browser_frame_view.cc ('k') | chrome/browser/ui/views/frame/opaque_browser_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698