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

Side by Side Diff: chrome/views/non_client_view.h

Issue 20161: Make aero glass code look more like other nonclient views in hopes of easing ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 | Annotate | Revision Log
« no previous file with comments | « chrome/views/custom_frame_window.cc ('k') | chrome/views/non_client_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_VIEWS_NON_CLIENT_VIEW_H_ 5 #ifndef CHROME_VIEWS_NON_CLIENT_VIEW_H_
6 #define CHROME_VIEWS_NON_CLIENT_VIEW_H_ 6 #define CHROME_VIEWS_NON_CLIENT_VIEW_H_
7 7
8 #include "chrome/views/view.h" 8 #include "chrome/views/view.h"
9 9
10 namespace gfx { 10 namespace gfx {
(...skipping 19 matching lines...) Expand all
30 // In restored mode, we draw a 1 px edge around the content area inside the 30 // In restored mode, we draw a 1 px edge around the content area inside the
31 // frame border. 31 // frame border.
32 static const int kClientEdgeThickness; 32 static const int kClientEdgeThickness;
33 33
34 // Calculates the bounds of the client area of the window assuming the 34 // Calculates the bounds of the client area of the window assuming the
35 // window is sized to |width| and |height|. 35 // window is sized to |width| and |height|.
36 virtual gfx::Rect CalculateClientAreaBounds(int width, 36 virtual gfx::Rect CalculateClientAreaBounds(int width,
37 int height) const = 0; 37 int height) const = 0;
38 38
39 // Calculates the size of window required to display a client area of the 39 // Calculates the size of window required to display a client area of the
40 // specified width and height. 40 // specified width and height. Only views used by CustomFrameWindow need
41 // implement this.
41 virtual gfx::Size CalculateWindowSizeForClientSize(int width, 42 virtual gfx::Size CalculateWindowSizeForClientSize(int width,
42 int height) const = 0; 43 int height) const {
44 return gfx::Size();
45 }
43 46
44 // Returns the point, in screen coordinates, where the system menu should 47 // Returns the point, in screen coordinates, where the system menu should
45 // be shown so it shows up anchored to the system menu icon. 48 // be shown so it shows up anchored to the system menu icon.
46 virtual CPoint GetSystemMenuPoint() const = 0; 49 virtual CPoint GetSystemMenuPoint() const = 0;
47 50
48 // Determines the windows HT* code when the mouse cursor is at the 51 // Determines the windows HT* code when the mouse cursor is at the
49 // specified point, in window coordinates. 52 // specified point, in window coordinates.
50 virtual int NonClientHitTest(const gfx::Point& point) = 0; 53 virtual int NonClientHitTest(const gfx::Point& point) = 0;
51 54
52 // Returns a mask to be used to clip the top level window for the given 55 // Returns a mask to be used to clip the top level window for the given
(...skipping 21 matching lines...) Expand all
74 protected: 77 protected:
75 NonClientView() : paint_as_active_(false) {} 78 NonClientView() : paint_as_active_(false) {}
76 79
77 // Helper for non-client view implementations to determine which area of the 80 // Helper for non-client view implementations to determine which area of the
78 // window border the specified |point| falls within. The other parameters are 81 // window border the specified |point| falls within. The other parameters are
79 // the size of the sizing edges, and whether or not the window can be 82 // the size of the sizing edges, and whether or not the window can be
80 // resized. 83 // resized.
81 int GetHTComponentForFrame(const gfx::Point& point, 84 int GetHTComponentForFrame(const gfx::Point& point,
82 int top_resize_border_height, 85 int top_resize_border_height,
83 int resize_border_thickness, 86 int resize_border_thickness,
84 int resize_corner_size, 87 int top_resize_corner_height,
88 int resize_corner_width,
85 bool can_resize); 89 bool can_resize);
86 90
87 // Accessor for paint_as_active_. 91 // Accessor for paint_as_active_.
88 bool paint_as_active() const { return paint_as_active_; } 92 bool paint_as_active() const { return paint_as_active_; }
89 93
90 private: 94 private:
91 // True when the non-client view should always be rendered as if the window 95 // True when the non-client view should always be rendered as if the window
92 // were active, regardless of whether or not the top level window actually 96 // were active, regardless of whether or not the top level window actually
93 // is active. 97 // is active.
94 bool paint_as_active_; 98 bool paint_as_active_;
95 }; 99 };
96 100
97 } // namespace views 101 } // namespace views
98 102
99 #endif // #ifndef CHROME_VIEWS_NON_CLIENT_VIEW_H_ 103 #endif // #ifndef CHROME_VIEWS_NON_CLIENT_VIEW_H_
100 104
OLDNEW
« no previous file with comments | « chrome/views/custom_frame_window.cc ('k') | chrome/views/non_client_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698