| OLD | NEW |
| 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 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h" | 5 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h" |
| 6 | 6 |
| 7 #import <QuartzCore/QuartzCore.h> | 7 #import <QuartzCore/QuartzCore.h> |
| 8 | 8 |
| 9 #include <cmath> | 9 #include <cmath> |
| 10 #include <limits> | 10 #include <limits> |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 if ([controller_ inRapidClosureMode]) { | 304 if ([controller_ inRapidClosureMode]) { |
| 305 if (hitView != self) { | 305 if (hitView != self) { |
| 306 [hitView mouseDown:event]; | 306 [hitView mouseDown:event]; |
| 307 return; | 307 return; |
| 308 } | 308 } |
| 309 } | 309 } |
| 310 | 310 |
| 311 if (hitView == self) { | 311 if (hitView == self) { |
| 312 BrowserWindowController* windowController = | 312 BrowserWindowController* windowController = |
| 313 [BrowserWindowController browserWindowControllerForView:self]; | 313 [BrowserWindowController browserWindowControllerForView:self]; |
| 314 if (![windowController isFullscreen]) { | 314 if (![windowController isInAnyFullscreenMode]) { |
| 315 [self trackClickForWindowMove:event]; | 315 [self trackClickForWindowMove:event]; |
| 316 return; | 316 return; |
| 317 } | 317 } |
| 318 } | 318 } |
| 319 [super mouseDown:event]; | 319 [super mouseDown:event]; |
| 320 } | 320 } |
| 321 | 321 |
| 322 - (void)trackClickForWindowMove:(NSEvent*)event { | 322 - (void)trackClickForWindowMove:(NSEvent*)event { |
| 323 NSWindow* window = [self window]; | 323 NSWindow* window = [self window]; |
| 324 NSPoint frameOrigin = [window frame].origin; | 324 NSPoint frameOrigin = [window frame].origin; |
| (...skipping 1904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2229 } | 2229 } |
| 2230 | 2230 |
| 2231 NSRect GetSheetParentBoundsForParentView(NSView* view) { | 2231 NSRect GetSheetParentBoundsForParentView(NSView* view) { |
| 2232 // If the devtools view is open, it shrinks the size of the WebContents, so go | 2232 // If the devtools view is open, it shrinks the size of the WebContents, so go |
| 2233 // up the hierarchy to the devtools container view to avoid that. Note that | 2233 // up the hierarchy to the devtools container view to avoid that. Note that |
| 2234 // the devtools view is always in the hierarchy even if it is not open or it | 2234 // the devtools view is always in the hierarchy even if it is not open or it |
| 2235 // is detached. | 2235 // is detached. |
| 2236 NSView* devtools_view = [[[view superview] superview] superview]; | 2236 NSView* devtools_view = [[[view superview] superview] superview]; |
| 2237 return [devtools_view convertRect:[devtools_view bounds] toView:nil]; | 2237 return [devtools_view convertRect:[devtools_view bounds] toView:nil]; |
| 2238 } | 2238 } |
| OLD | NEW |