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

Side by Side Diff: ui/views/window/non_client_view.h

Issue 8618001: Get rid of the EnableClose() infrastructure in Widget. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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 | « ui/views/window/native_frame_view.cc ('k') | ui/views/window/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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 UI_VIEWS_WINDOW_NON_CLIENT_VIEW_H_ 5 #ifndef UI_VIEWS_WINDOW_NON_CLIENT_VIEW_H_
6 #define UI_VIEWS_WINDOW_NON_CLIENT_VIEW_H_ 6 #define UI_VIEWS_WINDOW_NON_CLIENT_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include "ui/views/window/client_view.h" 9 #include "ui/views/window/client_view.h"
10 #include "views/view.h" 10 #include "views/view.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 virtual gfx::Rect GetWindowBoundsForClientBounds( 46 virtual gfx::Rect GetWindowBoundsForClientBounds(
47 const gfx::Rect& client_bounds) const = 0; 47 const gfx::Rect& client_bounds) const = 0;
48 48
49 // This function must ask the ClientView to do a hittest. We don't do this in 49 // This function must ask the ClientView to do a hittest. We don't do this in
50 // the parent NonClientView because that makes it more difficult to calculate 50 // the parent NonClientView because that makes it more difficult to calculate
51 // hittests for regions that are partially obscured by the ClientView, e.g. 51 // hittests for regions that are partially obscured by the ClientView, e.g.
52 // HTSYSMENU. 52 // HTSYSMENU.
53 virtual int NonClientHitTest(const gfx::Point& point) = 0; 53 virtual int NonClientHitTest(const gfx::Point& point) = 0;
54 virtual void GetWindowMask(const gfx::Size& size, 54 virtual void GetWindowMask(const gfx::Size& size,
55 gfx::Path* window_mask) = 0; 55 gfx::Path* window_mask) = 0;
56 virtual void EnableClose(bool enable) = 0;
57 virtual void ResetWindowControls() = 0; 56 virtual void ResetWindowControls() = 0;
58 virtual void UpdateWindowIcon() = 0; 57 virtual void UpdateWindowIcon() = 0;
59 58
60 // Overridden from View: 59 // Overridden from View:
61 virtual bool HitTest(const gfx::Point& l) const OVERRIDE; 60 virtual bool HitTest(const gfx::Point& l) const OVERRIDE;
62 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; 61 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
63 virtual std::string GetClassName() const OVERRIDE; 62 virtual std::string GetClassName() const OVERRIDE;
64 63
65 protected: 64 protected:
66 virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE; 65 virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE;
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 gfx::Rect GetWindowBoundsForClientBounds(const gfx::Rect client_bounds) const; 167 gfx::Rect GetWindowBoundsForClientBounds(const gfx::Rect client_bounds) const;
169 168
170 // Determines the windows HT* code when the mouse cursor is at the 169 // Determines the windows HT* code when the mouse cursor is at the
171 // specified point, in window coordinates. 170 // specified point, in window coordinates.
172 int NonClientHitTest(const gfx::Point& point); 171 int NonClientHitTest(const gfx::Point& point);
173 172
174 // Returns a mask to be used to clip the top level window for the given 173 // Returns a mask to be used to clip the top level window for the given
175 // size. This is used to create the non-rectangular window shape. 174 // size. This is used to create the non-rectangular window shape.
176 void GetWindowMask(const gfx::Size& size, gfx::Path* window_mask); 175 void GetWindowMask(const gfx::Size& size, gfx::Path* window_mask);
177 176
178 // Toggles the enable state for the Close button (and the Close menu item in
179 // the system menu).
180 void EnableClose(bool enable);
181
182 // Tells the window controls as rendered by the NonClientView to reset 177 // Tells the window controls as rendered by the NonClientView to reset
183 // themselves to a normal state. This happens in situations where the 178 // themselves to a normal state. This happens in situations where the
184 // containing window does not receive a normal sequences of messages that 179 // containing window does not receive a normal sequences of messages that
185 // would lead to the controls returning to this normal state naturally, e.g. 180 // would lead to the controls returning to this normal state naturally, e.g.
186 // when the window is maximized, minimized or restored. 181 // when the window is maximized, minimized or restored.
187 void ResetWindowControls(); 182 void ResetWindowControls();
188 183
189 // Tells the NonClientView to invalidate the NonClientFrameView's window icon. 184 // Tells the NonClientView to invalidate the NonClientFrameView's window icon.
190 void UpdateWindowIcon(); 185 void UpdateWindowIcon();
191 186
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 226
232 // The accessible name of this view. 227 // The accessible name of this view.
233 string16 accessible_name_; 228 string16 accessible_name_;
234 229
235 DISALLOW_COPY_AND_ASSIGN(NonClientView); 230 DISALLOW_COPY_AND_ASSIGN(NonClientView);
236 }; 231 };
237 232
238 } // namespace views 233 } // namespace views
239 234
240 #endif // UI_VIEWS_WINDOW_NON_CLIENT_VIEW_H_ 235 #endif // UI_VIEWS_WINDOW_NON_CLIENT_VIEW_H_
OLDNEW
« no previous file with comments | « ui/views/window/native_frame_view.cc ('k') | ui/views/window/non_client_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698