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

Side by Side Diff: chrome/browser/ui/views/frame/browser_non_client_frame_view_aura.cc

Issue 8400011: aura: Avoid resizing when dragging top of browser frame. (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 | « 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) 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 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view_aura.h" 5 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view_aura.h"
6 6
7 #include "chrome/browser/ui/views/frame/browser_frame.h" 7 #include "chrome/browser/ui/views/frame/browser_frame.h"
8 #include "chrome/browser/ui/views/frame/browser_view.h" 8 #include "chrome/browser/ui/views/frame/browser_view.h"
9 #include "grit/generated_resources.h" // Accessibility names 9 #include "grit/generated_resources.h" // Accessibility names
10 #include "grit/ui_resources.h" 10 #include "grit/ui_resources.h"
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 return HTMAXBUTTON; 230 return HTMAXBUTTON;
231 if (HitVisibleView(close_button_, point)) 231 if (HitVisibleView(close_button_, point))
232 return HTCLOSE; 232 return HTCLOSE;
233 233
234 int frame_component = GetWidget()->client_view()->NonClientHitTest(point); 234 int frame_component = GetWidget()->client_view()->NonClientHitTest(point);
235 if (frame_component != HTNOWHERE) 235 if (frame_component != HTNOWHERE)
236 return frame_component; 236 return frame_component;
237 237
238 // Test window resize components. 238 // Test window resize components.
239 bool can_resize = GetWidget()->widget_delegate()->CanResize(); 239 bool can_resize = GetWidget()->widget_delegate()->CanResize();
240 // TODO(derat): Disallow resizing via the top border in the Aura shell
241 // instead of enforcing it here. See http://crbug.com/101830.
240 frame_component = GetHTComponentForFrame(point, 242 frame_component = GetHTComponentForFrame(point,
243 0,
241 kResizeBorderThickness, 244 kResizeBorderThickness,
242 kResizeBorderThickness, 245 kResizeBorderThickness,
243 kResizeBorderThickness, 246 kResizeBorderThickness,
244 kResizeBorderThickness,
245 can_resize); 247 can_resize);
246 if (frame_component != HTNOWHERE) 248 if (frame_component != HTNOWHERE)
247 return frame_component; 249 return frame_component;
248 // Use HTCAPTION as a final fallback. 250 // Use HTCAPTION as a final fallback.
249 return HTCAPTION; 251 return HTCAPTION;
250 } 252 }
251 253
252 // Pass |active_window| explicitly because deactivating a window causes 254 // Pass |active_window| explicitly because deactivating a window causes
253 // OnWidgetActivationChanged() to be called before GetWidget()->IsActive() 255 // OnWidgetActivationChanged() to be called before GetWidget()->IsActive()
254 // changes state. 256 // changes state.
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 views::Widget* widget, bool active) { 516 views::Widget* widget, bool active) {
515 // Active windows have different background bounds. 517 // Active windows have different background bounds.
516 UpdateFrameBackground(active); 518 UpdateFrameBackground(active);
517 if (active) 519 if (active)
518 frame_background_->Show(); 520 frame_background_->Show();
519 else 521 else
520 frame_background_->Hide(); 522 frame_background_->Hide();
521 maximize_button_->SetVisible(active); 523 maximize_button_->SetVisible(active);
522 close_button_->SetVisible(active); 524 close_button_->SetVisible(active);
523 } 525 }
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