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

Side by Side Diff: chrome/browser/ui/app_list/app_list_service_mac.mm

Issue 1608733002: Remove ui/gfx/screen_type_delegate.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-4
Patch Set: and another rebase Created 4 years, 10 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
OLDNEW
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 #include <stddef.h> 9 #include <stddef.h>
10 10
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 break; 222 break;
223 case AppListPositioner::SCREEN_EDGE_UNKNOWN: 223 case AppListPositioner::SCREEN_EDGE_UNKNOWN:
224 case AppListPositioner::SCREEN_EDGE_TOP: 224 case AppListPositioner::SCREEN_EDGE_TOP:
225 NOTREACHED(); 225 NOTREACHED();
226 break; 226 break;
227 } 227 }
228 } 228 }
229 229
230 void GetAppListWindowOrigins( 230 void GetAppListWindowOrigins(
231 NSWindow* window, NSPoint* target_origin, NSPoint* start_origin) { 231 NSWindow* window, NSPoint* target_origin, NSPoint* start_origin) {
232 gfx::Screen* const screen = gfx::Screen::GetScreenFor([window contentView]); 232 gfx::Screen* const screen = gfx::Screen::GetScreen();
233 // Ensure y coordinates are flipped back into AppKit's coordinate system. 233 // Ensure y coordinates are flipped back into AppKit's coordinate system.
234 bool cursor_is_visible = CGCursorIsVisible(); 234 bool cursor_is_visible = CGCursorIsVisible();
235 gfx::Display display; 235 gfx::Display display;
236 gfx::Point cursor; 236 gfx::Point cursor;
237 if (!cursor_is_visible) { 237 if (!cursor_is_visible) {
238 // If Chrome is the active application, display on the same display as 238 // If Chrome is the active application, display on the same display as
239 // Chrome's keyWindow since this will catch activations triggered, e.g, via 239 // Chrome's keyWindow since this will catch activations triggered, e.g, via
240 // WebStore install. If another application is active, OSX doesn't provide a 240 // WebStore install. If another application is active, OSX doesn't provide a
241 // reliable way to get the display in use. Fall back to the primary display 241 // reliable way to get the display in use. Fall back to the primary display
242 // since it has the menu bar and is likely to be correct, e.g., for 242 // since it has the menu bar and is likely to be correct, e.g., for
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 581
582 - (void)animationDidEnd:(NSAnimation*)animation { 582 - (void)animationDidEnd:(NSAnimation*)animation {
583 content::BrowserThread::PostTask( 583 content::BrowserThread::PostTask(
584 content::BrowserThread::UI, 584 content::BrowserThread::UI,
585 FROM_HERE, 585 FROM_HERE,
586 base::Bind(&AppListServiceMac::WindowAnimationDidEnd, 586 base::Bind(&AppListServiceMac::WindowAnimationDidEnd,
587 base::Unretained(GetActiveInstance()))); 587 base::Unretained(GetActiveInstance())));
588 } 588 }
589 589
590 @end 590 @end
OLDNEW
« no previous file with comments | « chrome/browser/sync/sync_error_notifier_ash_unittest.cc ('k') | chrome/browser/ui/app_list/app_list_shower_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698