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

Side by Side Diff: chrome/browser/views/frame/opaque_non_client_view.h

Issue 18019: Pixel perfection on tabstrip for non-Aero frame. This gets both ends of the ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_VIEWS_FRAME_OPAQUE_NON_CLIENT_VIEW_H_ 5 #ifndef CHROME_BROWSER_VIEWS_FRAME_OPAQUE_NON_CLIENT_VIEW_H_
6 #define CHROME_BROWSER_VIEWS_FRAME_OPAQUE_NON_CLIENT_VIEW_H_ 6 #define CHROME_BROWSER_VIEWS_FRAME_OPAQUE_NON_CLIENT_VIEW_H_
7 7
8 #include "chrome/browser/views/frame/opaque_frame.h" 8 #include "chrome/browser/views/frame/opaque_frame.h"
9 #include "chrome/browser/views/tab_icon_view.h" 9 #include "chrome/browser/views/tab_icon_view.h"
10 #include "chrome/views/non_client_view.h" 10 #include "chrome/views/non_client_view.h"
(...skipping 13 matching lines...) Expand all
24 public: 24 public:
25 // Constructs a non-client view for an OpaqueFrame. |is_otr| specifies if the 25 // Constructs a non-client view for an OpaqueFrame. |is_otr| specifies if the
26 // frame was created "off-the-record" and as such different bitmaps should be 26 // frame was created "off-the-record" and as such different bitmaps should be
27 // used to render the frame. 27 // used to render the frame.
28 OpaqueNonClientView(OpaqueFrame* frame, BrowserView* browser_view); 28 OpaqueNonClientView(OpaqueFrame* frame, BrowserView* browser_view);
29 virtual ~OpaqueNonClientView(); 29 virtual ~OpaqueNonClientView();
30 30
31 // Retrieve the bounds of the window for the specified contents bounds. 31 // Retrieve the bounds of the window for the specified contents bounds.
32 gfx::Rect GetWindowBoundsForClientBounds(const gfx::Rect& client_bounds); 32 gfx::Rect GetWindowBoundsForClientBounds(const gfx::Rect& client_bounds);
33 33
34 // Retrieve the bounds (in ClientView coordinates) that the specified 34 // Retrieve the bounds for the specified |tabstrip|, in the coordinate system
35 // |tabstrip| will be laid out within. 35 // of the non-client view (which whould be window coordinates).
36 gfx::Rect GetBoundsForTabStrip(TabStrip* tabstrip); 36 gfx::Rect GetBoundsForTabStrip(TabStrip* tabstrip);
37 37
38 // Updates the window icon/throbber. 38 // Updates the window icon/throbber.
39 void UpdateWindowIcon(); 39 void UpdateWindowIcon();
40 40
41 protected: 41 protected:
42 // Overridden from TabIconView::TabIconViewModel: 42 // Overridden from TabIconView::TabIconViewModel:
43 virtual bool ShouldTabIconViewAnimate() const; 43 virtual bool ShouldTabIconViewAnimate() const;
44 virtual SkBitmap GetFavIconForTabIconView(); 44 virtual SkBitmap GetFavIconForTabIconView();
45 45
(...skipping 21 matching lines...) Expand all
67 views::View* child); 67 views::View* child);
68 virtual bool GetAccessibleRole(VARIANT* role); 68 virtual bool GetAccessibleRole(VARIANT* role);
69 virtual bool GetAccessibleName(std::wstring* name); 69 virtual bool GetAccessibleName(std::wstring* name);
70 virtual void SetAccessibleName(const std::wstring& name); 70 virtual void SetAccessibleName(const std::wstring& name);
71 71
72 private: 72 private:
73 // Returns the height of the non-client area at the top of the window (the 73 // Returns the height of the non-client area at the top of the window (the
74 // title bar, etc). 74 // title bar, etc).
75 int CalculateNonClientTopHeight() const; 75 int CalculateNonClientTopHeight() const;
76 76
77 // Returns the current thickness of the horizontal border that makes up the
78 // window edge.
79 int HorizontalBorderSize() const;
80
77 // Paint various sub-components of this view. 81 // Paint various sub-components of this view.
78 void PaintFrameBorder(ChromeCanvas* canvas); 82 void PaintFrameBorder(ChromeCanvas* canvas);
79 void PaintMaximizedFrameBorder(ChromeCanvas* canvas); 83 void PaintMaximizedFrameBorder(ChromeCanvas* canvas);
80 void PaintDistributorLogo(ChromeCanvas* canvas); 84 void PaintDistributorLogo(ChromeCanvas* canvas);
81 void PaintTitleBar(ChromeCanvas* canvas); 85 void PaintTitleBar(ChromeCanvas* canvas);
82 void PaintToolbarBackground(ChromeCanvas* canvas); 86 void PaintToolbarBackground(ChromeCanvas* canvas);
83 void PaintOTRAvatar(ChromeCanvas* canvas); 87 void PaintOTRAvatar(ChromeCanvas* canvas);
84 void PaintClientEdge(ChromeCanvas* canvas); 88 void PaintClientEdge(ChromeCanvas* canvas);
85 void PaintMaximizedClientEdge(ChromeCanvas* canvas); 89 void PaintMaximizedClientEdge(ChromeCanvas* canvas);
86 90
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 static views::WindowResources* inactive_resources_; 145 static views::WindowResources* inactive_resources_;
142 static views::WindowResources* active_otr_resources_; 146 static views::WindowResources* active_otr_resources_;
143 static views::WindowResources* inactive_otr_resources_; 147 static views::WindowResources* inactive_otr_resources_;
144 static ChromeFont title_font_; 148 static ChromeFont title_font_;
145 149
146 DISALLOW_EVIL_CONSTRUCTORS(OpaqueNonClientView); 150 DISALLOW_EVIL_CONSTRUCTORS(OpaqueNonClientView);
147 }; 151 };
148 152
149 #endif // #ifndef CHROME_BROWSER_VIEWS_FRAME_OPAQUE_NON_CLIENT_VIEW_H_ 153 #endif // #ifndef CHROME_BROWSER_VIEWS_FRAME_OPAQUE_NON_CLIENT_VIEW_H_
150 154
OLDNEW
« no previous file with comments | « chrome/browser/views/frame/browser_view.cc ('k') | chrome/browser/views/frame/opaque_non_client_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698