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

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

Issue 1682373002: Misc. small changes in preparation for moving popup mode edge drawing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix CrOS build Created 4 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/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/ui/view_ids.h" 10 #include "chrome/browser/ui/view_ids.h"
(...skipping 15 matching lines...) Expand all
26 class FrameBackground; 26 class FrameBackground;
27 class Label; 27 class Label;
28 } 28 }
29 29
30 class OpaqueBrowserFrameView : public BrowserNonClientFrameView, 30 class OpaqueBrowserFrameView : public BrowserNonClientFrameView,
31 public views::ButtonListener, 31 public views::ButtonListener,
32 public views::MenuButtonListener, 32 public views::MenuButtonListener,
33 public TabIconViewModel, 33 public TabIconViewModel,
34 public OpaqueBrowserFrameViewLayoutDelegate { 34 public OpaqueBrowserFrameViewLayoutDelegate {
35 public: 35 public:
36 // The content edge images have a shadow built into them.
37 static int kContentEdgeShadowThickness;
38
36 // Constructs a non-client view for an BrowserFrame. 39 // Constructs a non-client view for an BrowserFrame.
37 OpaqueBrowserFrameView(BrowserFrame* frame, BrowserView* browser_view); 40 OpaqueBrowserFrameView(BrowserFrame* frame, BrowserView* browser_view);
38 ~OpaqueBrowserFrameView() override; 41 ~OpaqueBrowserFrameView() override;
39 42
40 // BrowserNonClientFrameView: 43 // BrowserNonClientFrameView:
41 gfx::Rect GetBoundsForTabStrip(views::View* tabstrip) const override; 44 gfx::Rect GetBoundsForTabStrip(views::View* tabstrip) const override;
42 int GetTopInset(bool restored) const override; 45 int GetTopInset(bool restored) const override;
43 int GetThemeBackgroundXInset() const override; 46 int GetThemeBackgroundXInset() const override;
44 void UpdateThrobber(bool running) override; 47 void UpdateThrobber(bool running) override;
45 gfx::Size GetMinimumSize() const override; 48 gfx::Size GetMinimumSize() const override;
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 139
137 // Paint various sub-components of this view. The *FrameBorder() functions 140 // Paint various sub-components of this view. The *FrameBorder() functions
138 // also paint the background of the titlebar area, since the top frame border 141 // also paint the background of the titlebar area, since the top frame border
139 // and titlebar background are a contiguous component. 142 // and titlebar background are a contiguous component.
140 void PaintRestoredFrameBorder(gfx::Canvas* canvas) const; 143 void PaintRestoredFrameBorder(gfx::Canvas* canvas) const;
141 void PaintMaximizedFrameBorder(gfx::Canvas* canvas) const; 144 void PaintMaximizedFrameBorder(gfx::Canvas* canvas) const;
142 void PaintToolbarBackground(gfx::Canvas* canvas) const; 145 void PaintToolbarBackground(gfx::Canvas* canvas) const;
143 void PaintClientEdge(gfx::Canvas* canvas) const; 146 void PaintClientEdge(gfx::Canvas* canvas) const;
144 void FillClientEdgeRects(int x, 147 void FillClientEdgeRects(int x,
145 int y, 148 int y,
146 int right, 149 int w,
147 int bottom, 150 int height,
sky 2016/02/10 17:22:35 nti: if you're going to go with 'w' for width then
Peter Kasting 2016/02/11 06:02:32 Done.
148 SkColor color, 151 SkColor color,
149 gfx::Canvas* canvas) const; 152 gfx::Canvas* canvas) const;
150 153
151 // Our layout manager also calculates various bounds. 154 // Our layout manager also calculates various bounds.
152 OpaqueBrowserFrameViewLayout* layout_; 155 OpaqueBrowserFrameViewLayout* layout_;
153 156
154 // Window controls. 157 // Window controls.
155 views::ImageButton* minimize_button_; 158 views::ImageButton* minimize_button_;
156 views::ImageButton* maximize_button_; 159 views::ImageButton* maximize_button_;
157 views::ImageButton* restore_button_; 160 views::ImageButton* restore_button_;
158 views::ImageButton* close_button_; 161 views::ImageButton* close_button_;
159 162
160 // The window icon and title. 163 // The window icon and title.
161 TabIconView* window_icon_; 164 TabIconView* window_icon_;
162 views::Label* window_title_; 165 views::Label* window_title_;
163 166
164 // Background painter for the window frame. 167 // Background painter for the window frame.
165 scoped_ptr<views::FrameBackground> frame_background_; 168 scoped_ptr<views::FrameBackground> frame_background_;
166 169
167 // Observer that handles platform dependent configuration. 170 // Observer that handles platform dependent configuration.
168 scoped_ptr<OpaqueBrowserFrameViewPlatformSpecific> platform_observer_; 171 scoped_ptr<OpaqueBrowserFrameViewPlatformSpecific> platform_observer_;
169 172
170 DISALLOW_COPY_AND_ASSIGN(OpaqueBrowserFrameView); 173 DISALLOW_COPY_AND_ASSIGN(OpaqueBrowserFrameView);
171 }; 174 };
172 175
173 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_H_ 176 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698