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

Side by Side Diff: views/window/non_client_view.cc

Issue 149294: Inverted logic in UseNativeFrame meant all constrained windows were opened wi... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 5 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 | « no previous file | no next file » | 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 #include "views/window/non_client_view.h" 5 #include "views/window/non_client_view.h"
6 6
7 #include "app/theme_provider.h" 7 #include "app/theme_provider.h"
8 #include "views/widget/root_view.h" 8 #include "views/widget/root_view.h"
9 #include "views/widget/widget.h" 9 #include "views/widget/widget.h"
10 #include "views/window/window.h" 10 #include "views/window/window.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 SetFrameView(frame_->CreateFrameViewForWindow()); 63 SetFrameView(frame_->CreateFrameViewForWindow());
64 GetRootView()->ThemeChanged(); 64 GetRootView()->ThemeChanged();
65 Layout(); 65 Layout();
66 SchedulePaint(); 66 SchedulePaint();
67 frame_->UpdateFrameAfterFrameChange(); 67 frame_->UpdateFrameAfterFrameChange();
68 } 68 }
69 69
70 bool NonClientView::UseNativeFrame() const { 70 bool NonClientView::UseNativeFrame() const {
71 // The frame view may always require a custom frame, e.g. Constrained Windows. 71 // The frame view may always require a custom frame, e.g. Constrained Windows.
72 if (frame_view_.get() && frame_view_->AlwaysUseCustomFrame()) 72 if (frame_view_.get() && frame_view_->AlwaysUseCustomFrame())
73 return true; 73 return false;
74 return frame_->ShouldUseNativeFrame(); 74 return frame_->ShouldUseNativeFrame();
75 } 75 }
76 76
77 void NonClientView::DisableInactiveRendering(bool disable) { 77 void NonClientView::DisableInactiveRendering(bool disable) {
78 frame_view_->DisableInactiveRendering(disable); 78 frame_view_->DisableInactiveRendering(disable);
79 } 79 }
80 80
81 gfx::Rect NonClientView::GetWindowBoundsForClientBounds( 81 gfx::Rect NonClientView::GetWindowBoundsForClientBounds(
82 const gfx::Rect client_bounds) const { 82 const gfx::Rect client_bounds) const {
83 return frame_view_->GetWindowBoundsForClientBounds(client_bounds); 83 return frame_view_->GetWindowBoundsForClientBounds(client_bounds);
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 } else { 245 } else {
246 return HTNOWHERE; 246 return HTNOWHERE;
247 } 247 }
248 248
249 // If the window can't be resized, there are no resize boundaries, just 249 // If the window can't be resized, there are no resize boundaries, just
250 // window borders. 250 // window borders.
251 return can_resize ? component : HTBORDER; 251 return can_resize ? component : HTBORDER;
252 } 252 }
253 253
254 } // namespace views 254 } // namespace views
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698