OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/app_list/app_list_service_mac.h" | 5 #import "chrome/browser/ui/app_list/app_list_service_mac.h" |
6 | 6 |
7 #include <ApplicationServices/ApplicationServices.h> | 7 #include <ApplicationServices/ApplicationServices.h> |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 screen->GetDisplayNearestWindow(key_view) : | 243 screen->GetDisplayNearestWindow(key_view) : |
244 screen->GetPrimaryDisplay(); | 244 screen->GetPrimaryDisplay(); |
245 } else { | 245 } else { |
246 cursor = screen->GetCursorScreenPoint(); | 246 cursor = screen->GetCursorScreenPoint(); |
247 display = screen->GetDisplayNearestPoint(cursor); | 247 display = screen->GetDisplayNearestPoint(cursor); |
248 } | 248 } |
249 | 249 |
250 const NSSize ns_window_size = [window frame].size; | 250 const NSSize ns_window_size = [window frame].size; |
251 gfx::Size window_size(ns_window_size.width, ns_window_size.height); | 251 gfx::Size window_size(ns_window_size.width, ns_window_size.height); |
252 int primary_display_height = | 252 int primary_display_height = |
253 NSMaxY([[[NSScreen screens] objectAtIndex:0] frame]); | 253 NSMaxY([[[NSScreen screens] firstObject] frame]); |
254 AppListServiceMac::FindAnchorPoint(window_size, | 254 AppListServiceMac::FindAnchorPoint(window_size, |
255 display, | 255 display, |
256 primary_display_height, | 256 primary_display_height, |
257 cursor_is_visible, | 257 cursor_is_visible, |
258 cursor, | 258 cursor, |
259 target_origin, | 259 target_origin, |
260 start_origin); | 260 start_origin); |
261 } | 261 } |
262 | 262 |
263 AppListServiceMac* GetActiveInstance() { | 263 AppListServiceMac* GetActiveInstance() { |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
578 | 578 |
579 - (void)animationDidEnd:(NSAnimation*)animation { | 579 - (void)animationDidEnd:(NSAnimation*)animation { |
580 content::BrowserThread::PostTask( | 580 content::BrowserThread::PostTask( |
581 content::BrowserThread::UI, | 581 content::BrowserThread::UI, |
582 FROM_HERE, | 582 FROM_HERE, |
583 base::Bind(&AppListServiceMac::WindowAnimationDidEnd, | 583 base::Bind(&AppListServiceMac::WindowAnimationDidEnd, |
584 base::Unretained(GetActiveInstance()))); | 584 base::Unretained(GetActiveInstance()))); |
585 } | 585 } |
586 | 586 |
587 @end | 587 @end |
OLD | NEW |