OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/browser_window_fullscreen_transition.h" | 5 #import "chrome/browser/ui/cocoa/browser_window_fullscreen_transition.h" |
6 | 6 |
7 #include <QuartzCore/QuartzCore.h> | 7 #include <QuartzCore/QuartzCore.h> |
8 | 8 |
9 #include "base/mac/bind_objc_block.h" | 9 #include "base/mac/bind_objc_block.h" |
10 #include "base/mac/foundation_util.h" | 10 #include "base/mac/foundation_util.h" |
11 #include "base/mac/mac_util.h" | 11 #include "base/mac/mac_util.h" |
12 #import "base/mac/sdk_forward_declarations.h" | 12 #import "base/mac/sdk_forward_declarations.h" |
| 13 #include "base/macros.h" |
13 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
14 #import "chrome/browser/ui/cocoa/framed_browser_window.h" | 15 #import "chrome/browser/ui/cocoa/framed_browser_window.h" |
15 #import "chrome/browser/ui/cocoa/tabs/tab_strip_background_view.h" | 16 #import "chrome/browser/ui/cocoa/tabs/tab_strip_background_view.h" |
16 | 17 |
17 namespace { | 18 namespace { |
18 | 19 |
19 NSString* const kPrimaryWindowAnimationID = @"PrimaryWindowAnimationID"; | 20 NSString* const kPrimaryWindowAnimationID = @"PrimaryWindowAnimationID"; |
20 NSString* const kSnapshotWindowAnimationID = @"SnapshotWindowAnimationID"; | 21 NSString* const kSnapshotWindowAnimationID = @"SnapshotWindowAnimationID"; |
21 NSString* const kAnimationIDKey = @"AnimationIDKey"; | 22 NSString* const kAnimationIDKey = @"AnimationIDKey"; |
22 | 23 |
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 return [[[window contentView] superview] layer]; | 506 return [[[window contentView] superview] layer]; |
506 } | 507 } |
507 | 508 |
508 - (NSPoint)pointRelativeToCurrentScreen:(NSPoint)point { | 509 - (NSPoint)pointRelativeToCurrentScreen:(NSPoint)point { |
509 NSRect screenFrame = [[primaryWindow_ screen] frame]; | 510 NSRect screenFrame = [[primaryWindow_ screen] frame]; |
510 return NSMakePoint(point.x - screenFrame.origin.x, | 511 return NSMakePoint(point.x - screenFrame.origin.x, |
511 point.y - screenFrame.origin.y); | 512 point.y - screenFrame.origin.y); |
512 } | 513 } |
513 | 514 |
514 @end | 515 @end |
OLD | NEW |