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

Unified Diff: ui/app_list/cocoa/apps_search_box_controller.mm

Issue 1777653002: Prepare ui/ module for compilation with OS X 10.7 deployment target. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More compile errors. Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/base/cocoa/cocoa_base_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/cocoa/apps_search_box_controller.mm
diff --git a/ui/app_list/cocoa/apps_search_box_controller.mm b/ui/app_list/cocoa/apps_search_box_controller.mm
index 36ab4fe2dbc0ac327ac70576476dbafa80f8824a..d893269c1af9b9b5f04bb1db173996dc89109658 100644
--- a/ui/app_list/cocoa/apps_search_box_controller.mm
+++ b/ui/app_list/cocoa/apps_search_box_controller.mm
@@ -14,6 +14,7 @@
#include "ui/app_list/resources/grit/app_list_resources.h"
#include "ui/app_list/search_box_model.h"
#include "ui/app_list/search_box_model_observer.h"
+#include "ui/base/cocoa/cocoa_base_utils.h"
#import "ui/base/cocoa/controls/hover_image_menu_button.h"
#import "ui/base/cocoa/controls/hover_image_menu_button_cell.h"
#import "ui/base/cocoa/menu_controller.h"
@@ -389,9 +390,11 @@ void SearchBoxModelObserverBridge::TextChanged() {
// to a point anchored below the bottom right of the button.
NSRect anchorRect = [menuButton convertRect:[menuButton bounds]
toView:nil];
- NSPoint anchorPoint = [[menuButton window] convertBaseToScreen:NSMakePoint(
- NSMaxX(anchorRect) + kMenuXOffsetFromButton,
- NSMinY(anchorRect) - kMenuYOffsetFromButton)];
+ NSPoint anchorPoint = ui::ConvertPointFromWindowToScreen(
+ [menuButton window],
+ NSMakePoint(NSMaxX(anchorRect) + kMenuXOffsetFromButton,
+ NSMinY(anchorRect) - kMenuYOffsetFromButton));
+
NSRect confinementRect = [[menuButton window] frame];
confinementRect.size = NSMakeSize(anchorPoint.x - NSMinX(confinementRect),
anchorPoint.y - NSMinY(confinementRect));
« no previous file with comments | « no previous file | ui/base/cocoa/cocoa_base_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698