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

Side by Side Diff: chrome/browser/ui/views/frame/opaque_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: copy paste the right function 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_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 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "chrome/browser/ui/view_ids.h" 9 #include "chrome/browser/ui/view_ids.h"
10 #include "chrome/browser/ui/views/frame/browser_frame.h" 10 #include "chrome/browser/ui/views/frame/browser_frame.h"
11 #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"
12 #include "chrome/browser/ui/views/frame/opaque_browser_frame_view_layout_delegat e.h" 12 #include "chrome/browser/ui/views/frame/opaque_browser_frame_view_layout_delegat e.h"
13 #include "chrome/browser/ui/views/tab_icon_view_model.h" 13 #include "chrome/browser/ui/views/tab_icon_view_model.h"
14 #include "content/public/browser/notification_observer.h"
15 #include "content/public/browser/notification_registrar.h"
16 #include "ui/views/controls/button/button.h" 14 #include "ui/views/controls/button/button.h"
17 #include "ui/views/controls/button/menu_button_listener.h" 15 #include "ui/views/controls/button/menu_button_listener.h"
18 #include "ui/views/window/non_client_view.h" 16 #include "ui/views/window/non_client_view.h"
19 17
20 class BrowserView; 18 class BrowserView;
21 class OpaqueBrowserFrameViewLayout; 19 class OpaqueBrowserFrameViewLayout;
22 class OpaqueBrowserFrameViewPlatformSpecific; 20 class OpaqueBrowserFrameViewPlatformSpecific;
23 class TabIconView; 21 class TabIconView;
24 class NewAvatarButton; 22 class NewAvatarButton;
25 23
26 namespace views { 24 namespace views {
27 class ImageButton; 25 class ImageButton;
28 class FrameBackground; 26 class FrameBackground;
29 class Label; 27 class Label;
30 } 28 }
31 29
32 class OpaqueBrowserFrameView : public BrowserNonClientFrameView, 30 class OpaqueBrowserFrameView : public BrowserNonClientFrameView,
33 public content::NotificationObserver,
34 public views::ButtonListener, 31 public views::ButtonListener,
35 public views::MenuButtonListener, 32 public views::MenuButtonListener,
36 public chrome::TabIconViewModel, 33 public chrome::TabIconViewModel,
37 public OpaqueBrowserFrameViewLayoutDelegate { 34 public OpaqueBrowserFrameViewLayoutDelegate {
38 public: 35 public:
39 // Constructs a non-client view for an BrowserFrame. 36 // Constructs a non-client view for an BrowserFrame.
40 OpaqueBrowserFrameView(BrowserFrame* frame, BrowserView* browser_view); 37 OpaqueBrowserFrameView(BrowserFrame* frame, BrowserView* browser_view);
41 ~OpaqueBrowserFrameView() override; 38 ~OpaqueBrowserFrameView() override;
42 39
43 // BrowserNonClientFrameView: 40 // BrowserNonClientFrameView:
(...skipping 21 matching lines...) Expand all
65 void ButtonPressed(views::Button* sender, const ui::Event& event) override; 62 void ButtonPressed(views::Button* sender, const ui::Event& event) override;
66 63
67 // views::MenuButtonListener: 64 // views::MenuButtonListener:
68 void OnMenuButtonClicked(views::View* source, 65 void OnMenuButtonClicked(views::View* source,
69 const gfx::Point& point) override; 66 const gfx::Point& point) override;
70 67
71 // chrome::TabIconViewModel: 68 // chrome::TabIconViewModel:
72 bool ShouldTabIconViewAnimate() const override; 69 bool ShouldTabIconViewAnimate() const override;
73 gfx::ImageSkia GetFaviconForTabIconView() override; 70 gfx::ImageSkia GetFaviconForTabIconView() override;
74 71
75 // content::NotificationObserver implementation: 72 // ProfileInfoCacheObserver implementation:
76 void Observe(int type, 73 void OnProfileAdded(const base::FilePath& profile_path) override;
77 const content::NotificationSource& source, 74 void OnProfileWasRemoved(const base::FilePath& profile_path,
78 const content::NotificationDetails& details) override; 75 const base::string16& profile_name) override;
76 void OnProfileNameChanged(const base::FilePath& profile_path,
77 const base::string16& old_profile_name) override;
78 void OnProfileAvatarChanged(const base::FilePath& profile_path) override;
79 79
80 // OpaqueBrowserFrameViewLayoutDelegate implementation: 80 // OpaqueBrowserFrameViewLayoutDelegate implementation:
81 bool ShouldShowWindowIcon() const override; 81 bool ShouldShowWindowIcon() const override;
82 bool ShouldShowWindowTitle() const override; 82 bool ShouldShowWindowTitle() const override;
83 base::string16 GetWindowTitle() const override; 83 base::string16 GetWindowTitle() const override;
84 int GetIconSize() const override; 84 int GetIconSize() const override;
85 bool ShouldLeaveOffsetNearTopBorder() const override; 85 bool ShouldLeaveOffsetNearTopBorder() const override;
86 gfx::Size GetBrowserViewMinimumSize() const override; 86 gfx::Size GetBrowserViewMinimumSize() const override;
87 bool ShouldShowCaptionButtons() const override; 87 bool ShouldShowCaptionButtons() const override;
88 bool ShouldShowAvatar() const override; 88 bool ShouldShowAvatar() const override;
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 // Window controls. 164 // Window controls.
165 views::ImageButton* minimize_button_; 165 views::ImageButton* minimize_button_;
166 views::ImageButton* maximize_button_; 166 views::ImageButton* maximize_button_;
167 views::ImageButton* restore_button_; 167 views::ImageButton* restore_button_;
168 views::ImageButton* close_button_; 168 views::ImageButton* close_button_;
169 169
170 // The window icon and title. 170 // The window icon and title.
171 TabIconView* window_icon_; 171 TabIconView* window_icon_;
172 views::Label* window_title_; 172 views::Label* window_title_;
173 173
174 content::NotificationRegistrar registrar_;
175
176 // Background painter for the window frame. 174 // Background painter for the window frame.
177 scoped_ptr<views::FrameBackground> frame_background_; 175 scoped_ptr<views::FrameBackground> frame_background_;
178 176
179 // Observer that handles platform dependent configuration. 177 // Observer that handles platform dependent configuration.
180 scoped_ptr<OpaqueBrowserFrameViewPlatformSpecific> platform_observer_; 178 scoped_ptr<OpaqueBrowserFrameViewPlatformSpecific> platform_observer_;
181 179
182 DISALLOW_COPY_AND_ASSIGN(OpaqueBrowserFrameView); 180 DISALLOW_COPY_AND_ASSIGN(OpaqueBrowserFrameView);
183 }; 181 };
184 182
185 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_H_ 183 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698