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

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

Issue 1972033002: Simplify some old avatar menu button code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixes Created 4 years, 7 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_ASH_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_ASH_H_
6 #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_ASH_H_ 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_ASH_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "ash/shell_observer.h" 10 #include "ash/shell_observer.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 // ash::ShellObserver: 67 // ash::ShellObserver:
68 void OnMaximizeModeStarted() override; 68 void OnMaximizeModeStarted() override;
69 void OnMaximizeModeEnded() override; 69 void OnMaximizeModeEnded() override;
70 70
71 // TabIconViewModel: 71 // TabIconViewModel:
72 bool ShouldTabIconViewAnimate() const override; 72 bool ShouldTabIconViewAnimate() const override;
73 gfx::ImageSkia GetFaviconForTabIconView() override; 73 gfx::ImageSkia GetFaviconForTabIconView() override;
74 74
75 protected: 75 protected:
76 // BrowserNonClientFrameView: 76 // BrowserNonClientFrameView:
77 void UpdateAvatar() override; 77 void UpdateProfileIcons() override;
78 78
79 private: 79 private:
80 FRIEND_TEST_ALL_PREFIXES(BrowserNonClientFrameViewAshTest, WindowHeader); 80 FRIEND_TEST_ALL_PREFIXES(BrowserNonClientFrameViewAshTest, WindowHeader);
81 FRIEND_TEST_ALL_PREFIXES(BrowserNonClientFrameViewAshTest, 81 FRIEND_TEST_ALL_PREFIXES(BrowserNonClientFrameViewAshTest,
82 NonImmersiveFullscreen); 82 NonImmersiveFullscreen);
83 FRIEND_TEST_ALL_PREFIXES(BrowserNonClientFrameViewAshTest, 83 FRIEND_TEST_ALL_PREFIXES(BrowserNonClientFrameViewAshTest,
84 ImmersiveFullscreen); 84 ImmersiveFullscreen);
85 FRIEND_TEST_ALL_PREFIXES(BrowserNonClientFrameViewAshTest, 85 FRIEND_TEST_ALL_PREFIXES(BrowserNonClientFrameViewAshTest,
86 ToggleMaximizeModeRelayout); 86 ToggleMaximizeModeRelayout);
87 FRIEND_TEST_ALL_PREFIXES(WebAppLeftHeaderViewTest, BackButton); 87 FRIEND_TEST_ALL_PREFIXES(WebAppLeftHeaderViewTest, BackButton);
(...skipping 19 matching lines...) Expand all
107 // Returns true if the header should be painted so that it looks the same as 107 // Returns true if the header should be painted so that it looks the same as
108 // the header used for packaged apps. Packaged apps use a different color 108 // the header used for packaged apps. Packaged apps use a different color
109 // scheme than browser windows. 109 // scheme than browser windows.
110 bool UsePackagedAppHeaderStyle() const; 110 bool UsePackagedAppHeaderStyle() const;
111 111
112 // Returns true if the header should be painted with a WebApp header style. 112 // Returns true if the header should be painted with a WebApp header style.
113 // The WebApp header style has a back button and title along with the usual 113 // The WebApp header style has a back button and title along with the usual
114 // accoutrements. 114 // accoutrements.
115 bool UseWebAppHeaderStyle() const; 115 bool UseWebAppHeaderStyle() const;
116 116
117 // Layout the avatar button. 117 void LayoutProfileIndicator();
Peter Kasting 2016/05/18 02:44:01 Nit: Should this be LayoutProfileIndicatorIcon()?
Evan Stade 2016/05/20 22:04:43 Done.
118 void LayoutAvatar();
119 118
120 // Returns true if there is anything to paint. Some fullscreen windows do not 119 // Returns true if there is anything to paint. Some fullscreen windows do not
121 // need their frames painted. 120 // need their frames painted.
122 bool ShouldPaint() const; 121 bool ShouldPaint() const;
123 122
124 void PaintToolbarBackground(gfx::Canvas* canvas); 123 void PaintToolbarBackground(gfx::Canvas* canvas);
125 124
126 // View which contains the window controls. 125 // View which contains the window controls.
127 ash::FrameCaptionButtonContainerView* caption_button_container_; 126 ash::FrameCaptionButtonContainerView* caption_button_container_;
128 127
129 // The holder for the buttons on the left side of the header. This is included 128 // The holder for the buttons on the left side of the header. This is included
130 // for web app style frames, and includes a back button and location icon. 129 // for web app style frames, and includes a back button and location icon.
131 WebAppLeftHeaderView* web_app_left_header_view_; 130 WebAppLeftHeaderView* web_app_left_header_view_;
132 131
133 // For popups, the window icon. 132 // For popups, the window icon.
134 TabIconView* window_icon_; 133 TabIconView* window_icon_;
135 134
136 // Helper class for painting the header. 135 // Helper class for painting the header.
137 std::unique_ptr<ash::HeaderPainter> header_painter_; 136 std::unique_ptr<ash::HeaderPainter> header_painter_;
138 137
139 // Updates the hittest bounds overrides based on the window show type. 138 // Updates the hittest bounds overrides based on the window show type.
140 std::unique_ptr<ash::FrameBorderHitTestController> 139 std::unique_ptr<ash::FrameBorderHitTestController>
141 frame_border_hit_test_controller_; 140 frame_border_hit_test_controller_;
142 141
143 DISALLOW_COPY_AND_ASSIGN(BrowserNonClientFrameViewAsh); 142 DISALLOW_COPY_AND_ASSIGN(BrowserNonClientFrameViewAsh);
144 }; 143 };
145 144
146 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_ASH_H_ 145 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_ASH_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698