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

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

Issue 1972033002: Simplify some old avatar menu button code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: reinstate ash browser test fix 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_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 <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 bool ShouldTabIconViewAnimate() const override; 73 bool ShouldTabIconViewAnimate() const override;
74 gfx::ImageSkia GetFaviconForTabIconView() override; 74 gfx::ImageSkia GetFaviconForTabIconView() override;
75 75
76 // OpaqueBrowserFrameViewLayoutDelegate implementation: 76 // OpaqueBrowserFrameViewLayoutDelegate implementation:
77 bool ShouldShowWindowIcon() const override; 77 bool ShouldShowWindowIcon() const override;
78 bool ShouldShowWindowTitle() const override; 78 bool ShouldShowWindowTitle() const override;
79 base::string16 GetWindowTitle() const override; 79 base::string16 GetWindowTitle() const override;
80 int GetIconSize() const override; 80 int GetIconSize() const override;
81 gfx::Size GetBrowserViewMinimumSize() const override; 81 gfx::Size GetBrowserViewMinimumSize() const override;
82 bool ShouldShowCaptionButtons() const override; 82 bool ShouldShowCaptionButtons() const override;
83 bool ShouldShowAvatar() const override;
84 bool IsRegularOrGuestSession() const override; 83 bool IsRegularOrGuestSession() const override;
85 gfx::ImageSkia GetOTRAvatarIcon() const override; 84 gfx::ImageSkia GetOTRAvatarIcon() const override;
86 bool IsMaximized() const override; 85 bool IsMaximized() const override;
87 bool IsMinimized() const override; 86 bool IsMinimized() const override;
88 bool IsFullscreen() const override; 87 bool IsFullscreen() const override;
89 bool IsTabStripVisible() const override; 88 bool IsTabStripVisible() const override;
90 int GetTabStripHeight() const override; 89 int GetTabStripHeight() const override;
91 bool IsToolbarVisible() const override; 90 bool IsToolbarVisible() const override;
92 gfx::Size GetTabstripPreferredSize() const override; 91 gfx::Size GetTabstripPreferredSize() const override;
93 int GetToolbarLeadingCornerClientWidth() const override; 92 int GetToolbarLeadingCornerClientWidth() const override;
94 93
95 protected: 94 protected:
96 views::ImageButton* minimize_button() const { return minimize_button_; } 95 views::ImageButton* minimize_button() const { return minimize_button_; }
97 views::ImageButton* maximize_button() const { return maximize_button_; } 96 views::ImageButton* maximize_button() const { return maximize_button_; }
98 views::ImageButton* restore_button() const { return restore_button_; } 97 views::ImageButton* restore_button() const { return restore_button_; }
99 views::ImageButton* close_button() const { return close_button_; } 98 views::ImageButton* close_button() const { return close_button_; }
100 99
101 // views::View: 100 // views::View:
102 void OnPaint(gfx::Canvas* canvas) override; 101 void OnPaint(gfx::Canvas* canvas) override;
103 102
104 // BrowserNonClientFrameView: 103 // BrowserNonClientFrameView:
105 bool ShouldPaintAsThemed() const override; 104 bool ShouldPaintAsThemed() const override;
106 void UpdateAvatar() override; 105 void UpdateProfileIcons() override;
107 106
108 private: 107 private:
109 // views::NonClientFrameView: 108 // views::NonClientFrameView:
110 bool DoesIntersectRect(const views::View* target, 109 bool DoesIntersectRect(const views::View* target,
111 const gfx::Rect& rect) const override; 110 const gfx::Rect& rect) const override;
112 111
113 // Creates, adds and returns a new image button with |this| as its listener. 112 // Creates, adds and returns a new image button with |this| as its listener.
114 // Memory is owned by the caller. 113 // Memory is owned by the caller.
115 views::ImageButton* InitWindowCaptionButton(int normal_image_id, 114 views::ImageButton* InitWindowCaptionButton(int normal_image_id,
116 int hot_image_id, 115 int hot_image_id,
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 // Background painter for the window frame. 174 // Background painter for the window frame.
176 std::unique_ptr<views::FrameBackground> frame_background_; 175 std::unique_ptr<views::FrameBackground> frame_background_;
177 176
178 // Observer that handles platform dependent configuration. 177 // Observer that handles platform dependent configuration.
179 std::unique_ptr<OpaqueBrowserFrameViewPlatformSpecific> platform_observer_; 178 std::unique_ptr<OpaqueBrowserFrameViewPlatformSpecific> platform_observer_;
180 179
181 DISALLOW_COPY_AND_ASSIGN(OpaqueBrowserFrameView); 180 DISALLOW_COPY_AND_ASSIGN(OpaqueBrowserFrameView);
182 }; 181 };
183 182
184 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_H_ 183 #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