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

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

Issue 27317: Support DWM switching.... (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_VIEWS_FRAME_AERO_GLASS_NON_CLIENT_VIEW_H_
6 #define CHROME_BROWSER_VIEWS_FRAME_AERO_GLASS_NON_CLIENT_VIEW_H_
7
8 #include "chrome/browser/views/frame/aero_glass_frame.h"
9 #include "chrome/views/non_client_view.h"
10 #include "chrome/views/button.h"
11
12 class BrowserView;
13 class AeroGlassWindowResources;
14
15 class AeroGlassNonClientView : public views::NonClientView {
16 public:
17 // Constructs a non-client view for an AeroGlassFrame.
18 AeroGlassNonClientView(AeroGlassFrame* frame, BrowserView* browser_view);
19 virtual ~AeroGlassNonClientView();
20
21 // Retrieve the bounds for the specified |tabstrip|, in the coordinate system
22 // of the non-client view (which whould be window coordinates).
23 gfx::Rect GetBoundsForTabStrip(TabStrip* tabstrip);
24
25 protected:
26 // Overridden from views::NonClientView:
27 virtual gfx::Rect CalculateClientAreaBounds(int width, int height) const;
28 virtual gfx::Size CalculateWindowSizeForClientSize(int width,
29 int height) const;
30 virtual gfx::Point GetSystemMenuPoint() const;
31 virtual int NonClientHitTest(const gfx::Point& point);
32 virtual void GetWindowMask(const gfx::Size& size, gfx::Path* window_mask) { }
33 virtual void EnableClose(bool enable) { }
34 virtual void ResetWindowControls() { }
35
36 // Overridden from views::View:
37 virtual void Paint(ChromeCanvas* canvas);
38 virtual void Layout();
39 virtual void ViewHierarchyChanged(bool is_add,
40 views::View* parent,
41 views::View* child);
42
43 private:
44 // Returns the thickness of the border that makes up the window frame edges.
45 // This does not include any client edge.
46 int FrameBorderThickness() const;
47
48 // Returns the thickness of the entire nonclient left, right, and bottom
49 // borders, including both the window frame and any client edge.
50 int NonClientBorderThickness() const;
51
52 // Returns the height of the entire nonclient top border, including the window
53 // frame, any title area, and any connected client edge.
54 int NonClientTopBorderHeight() const;
55
56 // Paint various sub-components of this view.
57 void PaintDistributorLogo(ChromeCanvas* canvas);
58 void PaintToolbarBackground(ChromeCanvas* canvas);
59 void PaintOTRAvatar(ChromeCanvas* canvas);
60 void PaintClientEdge(ChromeCanvas* canvas);
61
62 // Layout various sub-components of this view.
63 void LayoutDistributorLogo();
64 void LayoutOTRAvatar();
65 void LayoutClientView();
66
67 // The layout rect of the distributor logo, if visible.
68 gfx::Rect logo_bounds_;
69
70 // The layout rect of the OTR avatar icon, if visible.
71 gfx::Rect otr_avatar_bounds_;
72
73 // The frame that hosts this view.
74 AeroGlassFrame* frame_;
75
76 // The BrowserView hosted within this View.
77 BrowserView* browser_view_;
78
79 static void InitClass();
80 static SkBitmap* distributor_logo_;
81 static AeroGlassWindowResources* resources_;
82
83 DISALLOW_EVIL_CONSTRUCTORS(AeroGlassNonClientView);
84 };
85
86 #endif // #ifndef CHROME_BROWSER_VIEWS_FRAME_AERO_GLASS_NON_CLIENT_VIEW_H_
87
OLDNEW
« no previous file with comments | « chrome/browser/views/frame/aero_glass_frame.cc ('k') | chrome/browser/views/frame/aero_glass_non_client_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698