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

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

Issue 1004803002: [Win] Cleanup: The BrowserFrameView doesn't need to listen to profile name changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/frame/browser_non_client_frame_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/ui/views/profiles/new_avatar_button.h" 8 #include "chrome/browser/ui/views/profiles/new_avatar_button.h"
9 #include "ui/views/window/non_client_view.h" 9 #include "ui/views/window/non_client_view.h"
10 10
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 virtual bool ShouldPaintAsThemed() const; 73 virtual bool ShouldPaintAsThemed() const;
74 74
75 // Compute aspects of the frame needed to paint the frame background. 75 // Compute aspects of the frame needed to paint the frame background.
76 SkColor GetFrameColor() const; 76 SkColor GetFrameColor() const;
77 gfx::ImageSkia* GetFrameImage() const; 77 gfx::ImageSkia* GetFrameImage() const;
78 gfx::ImageSkia* GetFrameOverlayImage() const; 78 gfx::ImageSkia* GetFrameOverlayImage() const;
79 int GetTopAreaHeight() const; 79 int GetTopAreaHeight() const;
80 80
81 // Updates the avatar button using the old or new UI based on the BrowserView 81 // Updates the avatar button using the old or new UI based on the BrowserView
82 // type, and the presence of the --enable-new-avatar-menu flag. Calls either 82 // type, and the presence of the --enable-new-avatar-menu flag. Calls either
83 // UpdateAvatarInfo() or UpdateNewStyleAvatar() accordingly. 83 // UpdateOldAvatarButton() or UpdateNewAvatarButtonImpl() accordingly.
84 void UpdateAvatar(); 84 void UpdateAvatar();
85 85
86 // Updates the title and icon of the old avatar button. 86 // Updates the title and icon of the old avatar button.
87 void UpdateAvatarInfo(); 87 void UpdateOldAvatarButton();
88 88
89 // Updates the avatar button displayed in the caption area by calling 89 // Updates the avatar button displayed in the caption area by calling
90 // UpdateNewStyleAvatarInfo() with an implementation specific |listener| 90 // UpdateNewAvatarButton() with an implementation specific |listener|
91 // and button |style|. 91 // and button |style|.
92 virtual void UpdateNewStyleAvatar() = 0; 92 virtual void UpdateNewAvatarButtonImpl() = 0;
93 93
94 // Updates the title of the avatar button displayed in the caption area. 94 // Updates the title of the avatar button displayed in the caption area.
95 // The button uses |style| to match the browser window style and notifies 95 // The button uses |style| to match the browser window style and notifies
96 // |listener| when it is clicked. 96 // |listener| when it is clicked.
97 void UpdateNewStyleAvatarInfo(views::ButtonListener* listener, 97 void UpdateNewAvatarButton(views::ButtonListener* listener,
98 const NewAvatarButton::AvatarButtonStyle style); 98 const NewAvatarButton::AvatarButtonStyle style);
99 99
100 private: 100 private:
101 // Overriden from ProfileInfoCacheObserver. 101 // Overriden from ProfileInfoCacheObserver.
102 void OnProfileAdded(const base::FilePath& profile_path) override; 102 void OnProfileAdded(const base::FilePath& profile_path) override;
103 void OnProfileWasRemoved(const base::FilePath& profile_path, 103 void OnProfileWasRemoved(const base::FilePath& profile_path,
104 const base::string16& profile_name) override; 104 const base::string16& profile_name) override;
105 void OnProfileAvatarChanged(const base::FilePath& profile_path) override; 105 void OnProfileAvatarChanged(const base::FilePath& profile_path) override;
106 void OnProfileNameChanged(const base::FilePath& profile_path,
107 const base::string16& old_profile_name) override;
108 106
109 // Draws a taskbar icon if avatars are enabled, erases it otherwise. 107 // Draws a taskbar icon if avatars are enabled, erases it otherwise.
110 void UpdateTaskbarDecoration(); 108 void UpdateTaskbarDecoration();
111 109
112 // The frame that hosts this view. 110 // The frame that hosts this view.
113 BrowserFrame* frame_; 111 BrowserFrame* frame_;
114 112
115 // The BrowserView hosted within this View. 113 // The BrowserView hosted within this View.
116 BrowserView* browser_view_; 114 BrowserView* browser_view_;
117 115
(...skipping 12 matching lines...) Expand all
130 128
131 namespace chrome { 129 namespace chrome {
132 130
133 // Provided by a browser_non_client_frame_view_factory_*.cc implementation 131 // Provided by a browser_non_client_frame_view_factory_*.cc implementation
134 BrowserNonClientFrameView* CreateBrowserNonClientFrameView( 132 BrowserNonClientFrameView* CreateBrowserNonClientFrameView(
135 BrowserFrame* frame, BrowserView* browser_view); 133 BrowserFrame* frame, BrowserView* browser_view);
136 134
137 } // namespace chrome 135 } // namespace chrome
138 136
139 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_H_ 137 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_H_
OLDNEW
« no previous file with comments | « no previous file | 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