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

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

Issue 38073004: Not moving a docked window when restoring a previously maximized window (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Not moving a docked window when restoring a previously maximized window (delegating IsDocked to non… Created 7 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
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 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 7
8 #include "ui/views/view.h" 8 #include "ui/views/view.h"
9 9
10 namespace gfx { 10 namespace gfx {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 // the parent NonClientView because that makes it more difficult to calculate 61 // the parent NonClientView because that makes it more difficult to calculate
62 // hittests for regions that are partially obscured by the ClientView, e.g. 62 // hittests for regions that are partially obscured by the ClientView, e.g.
63 // HTSYSMENU. 63 // HTSYSMENU.
64 virtual int NonClientHitTest(const gfx::Point& point) = 0; 64 virtual int NonClientHitTest(const gfx::Point& point) = 0;
65 virtual void GetWindowMask(const gfx::Size& size, 65 virtual void GetWindowMask(const gfx::Size& size,
66 gfx::Path* window_mask) = 0; 66 gfx::Path* window_mask) = 0;
67 virtual void ResetWindowControls() = 0; 67 virtual void ResetWindowControls() = 0;
68 virtual void UpdateWindowIcon() = 0; 68 virtual void UpdateWindowIcon() = 0;
69 virtual void UpdateWindowTitle() = 0; 69 virtual void UpdateWindowTitle() = 0;
70 70
71 // Can be overridden on platforms that support docked windows to return true
72 // if a top-level window is docked.
73 virtual bool IsDocked() const { return false; }
74
71 // Overridden from View: 75 // Overridden from View:
72 virtual bool HitTestRect(const gfx::Rect& rect) const OVERRIDE; 76 virtual bool HitTestRect(const gfx::Rect& rect) const OVERRIDE;
73 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; 77 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
74 virtual const char* GetClassName() const OVERRIDE; 78 virtual const char* GetClassName() const OVERRIDE;
75 79
76 protected: 80 protected:
77 virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE; 81 virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE;
78 82
79 NonClientFrameView() : paint_as_active_(false) {} 83 NonClientFrameView() : paint_as_active_(false) {}
80 84
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 } 204 }
201 205
202 // Layout just the frame view. This is necessary on Windows when non-client 206 // Layout just the frame view. This is necessary on Windows when non-client
203 // metrics such as the position of the window controls changes independently 207 // metrics such as the position of the window controls changes independently
204 // of a window resize message. 208 // of a window resize message.
205 void LayoutFrameView(); 209 void LayoutFrameView();
206 210
207 // Set the accessible name of this view. 211 // Set the accessible name of this view.
208 void SetAccessibleName(const string16& name); 212 void SetAccessibleName(const string16& name);
209 213
214 // Returns true if the frame view is docked (on platforms that support docked
215 // windows).
216 bool IsFrameViewDocked() const;
217
210 // NonClientView, View overrides: 218 // NonClientView, View overrides:
211 virtual gfx::Size GetPreferredSize() OVERRIDE; 219 virtual gfx::Size GetPreferredSize() OVERRIDE;
212 virtual gfx::Size GetMinimumSize() OVERRIDE; 220 virtual gfx::Size GetMinimumSize() OVERRIDE;
213 virtual gfx::Size GetMaximumSize() OVERRIDE; 221 virtual gfx::Size GetMaximumSize() OVERRIDE;
214 virtual void Layout() OVERRIDE; 222 virtual void Layout() OVERRIDE;
215 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; 223 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
216 virtual const char* GetClassName() const OVERRIDE; 224 virtual const char* GetClassName() const OVERRIDE;
217 225
218 virtual views::View* GetEventHandlerForPoint( 226 virtual views::View* GetEventHandlerForPoint(
219 const gfx::Point& point) OVERRIDE; 227 const gfx::Point& point) OVERRIDE;
(...skipping 22 matching lines...) Expand all
242 250
243 // The accessible name of this view. 251 // The accessible name of this view.
244 string16 accessible_name_; 252 string16 accessible_name_;
245 253
246 DISALLOW_COPY_AND_ASSIGN(NonClientView); 254 DISALLOW_COPY_AND_ASSIGN(NonClientView);
247 }; 255 };
248 256
249 } // namespace views 257 } // namespace views
250 258
251 #endif // UI_VIEWS_WINDOW_NON_CLIENT_VIEW_H_ 259 #endif // UI_VIEWS_WINDOW_NON_CLIENT_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698