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

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

Issue 895803003: [Profiles] Remove the NotificationService from the ProfileInfoCache (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cait nit Created 5 years, 10 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_GLASS_BROWSER_FRAME_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_GLASS_BROWSER_FRAME_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_FRAME_GLASS_BROWSER_FRAME_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_GLASS_BROWSER_FRAME_VIEW_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h" 9 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h"
10 #include "content/public/browser/notification_observer.h"
11 #include "content/public/browser/notification_registrar.h"
12 #include "ui/views/controls/button/button.h" 10 #include "ui/views/controls/button/button.h"
13 #include "ui/views/window/non_client_view.h" 11 #include "ui/views/window/non_client_view.h"
14 12
15 class BrowserView; 13 class BrowserView;
16 14
17 class GlassBrowserFrameView : public BrowserNonClientFrameView, 15 class GlassBrowserFrameView : public BrowserNonClientFrameView,
18 public views::ButtonListener, 16 public views::ButtonListener {
19 public content::NotificationObserver {
20 public: 17 public:
21 // Constructs a non-client view for an BrowserFrame. 18 // Constructs a non-client view for an BrowserFrame.
22 GlassBrowserFrameView(BrowserFrame* frame, BrowserView* browser_view); 19 GlassBrowserFrameView(BrowserFrame* frame, BrowserView* browser_view);
23 virtual ~GlassBrowserFrameView(); 20 virtual ~GlassBrowserFrameView();
24 21
25 // BrowserNonClientFrameView: 22 // BrowserNonClientFrameView:
26 virtual gfx::Rect GetBoundsForTabStrip(views::View* tabstrip) const override; 23 virtual gfx::Rect GetBoundsForTabStrip(views::View* tabstrip) const override;
27 virtual int GetTopInset() const override; 24 virtual int GetTopInset() const override;
28 virtual int GetThemeBackgroundXInset() const override; 25 virtual int GetThemeBackgroundXInset() const override;
29 virtual void UpdateThrobber(bool running) override; 26 virtual void UpdateThrobber(bool running) override;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 // Returns the bounds of the client area for the specified view size. 79 // Returns the bounds of the client area for the specified view size.
83 gfx::Rect CalculateClientAreaBounds(int width, int height) const; 80 gfx::Rect CalculateClientAreaBounds(int width, int height) const;
84 81
85 // Starts/Stops the window throbber running. 82 // Starts/Stops the window throbber running.
86 void StartThrobber(); 83 void StartThrobber();
87 void StopThrobber(); 84 void StopThrobber();
88 85
89 // Displays the next throbber frame. 86 // Displays the next throbber frame.
90 void DisplayNextThrobberFrame(); 87 void DisplayNextThrobberFrame();
91 88
92 // content::NotificationObserver implementation: 89 // ProfileInfoCacheObserver implementation:
93 virtual void Observe(int type, 90 void OnProfileAdded(const base::FilePath& profile_path) override;
94 const content::NotificationSource& source, 91 void OnProfileWasRemoved(const base::FilePath& profile_path,
95 const content::NotificationDetails& details) override; 92 const base::string16& profile_name) override;
93 void OnProfileNameChanged(const base::FilePath& profile_path,
94 const base::string16& old_profile_name) override;
95 void OnProfileAvatarChanged(const base::FilePath& profile_path) override;
96 96
97 // The layout rect of the avatar icon, if visible. 97 // The layout rect of the avatar icon, if visible.
98 gfx::Rect avatar_bounds_; 98 gfx::Rect avatar_bounds_;
99 99
100 // The bounds of the ClientView. 100 // The bounds of the ClientView.
101 gfx::Rect client_view_bounds_; 101 gfx::Rect client_view_bounds_;
102 102
103 // Whether or not the window throbber is currently animating. 103 // Whether or not the window throbber is currently animating.
104 bool throbber_running_; 104 bool throbber_running_;
105 105
106 // The index of the current frame of the throbber animation. 106 // The index of the current frame of the throbber animation.
107 int throbber_frame_; 107 int throbber_frame_;
108 108
109 content::NotificationRegistrar registrar_;
110
111 static const int kThrobberIconCount = 24; 109 static const int kThrobberIconCount = 24;
112 static HICON throbber_icons_[kThrobberIconCount]; 110 static HICON throbber_icons_[kThrobberIconCount];
113 static void InitThrobberIcons(); 111 static void InitThrobberIcons();
114 112
115 DISALLOW_COPY_AND_ASSIGN(GlassBrowserFrameView); 113 DISALLOW_COPY_AND_ASSIGN(GlassBrowserFrameView);
116 }; 114 };
117 115
118 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_GLASS_BROWSER_FRAME_VIEW_H_ 116 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_GLASS_BROWSER_FRAME_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698