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

Unified Diff: chrome/browser/ui/cocoa/status_bubble_mac.mm

Issue 1775223002: Prepare chrome/ for compilation with OS X 10.7 deployment target. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compile errors. Fix null-window error. 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
Index: chrome/browser/ui/cocoa/status_bubble_mac.mm
diff --git a/chrome/browser/ui/cocoa/status_bubble_mac.mm b/chrome/browser/ui/cocoa/status_bubble_mac.mm
index 503a07019e840ed4a9b58dca99b6d026427fe704..653e333cc869f6169761ec94b8a0fa6fa3e9c1ac 100644
--- a/chrome/browser/ui/cocoa/status_bubble_mac.mm
+++ b/chrome/browser/ui/cocoa/status_bubble_mac.mm
@@ -22,6 +22,7 @@
#import "third_party/google_toolbox_for_mac/src/AppKit/GTMNSAnimation+Duration.h"
#import "third_party/google_toolbox_for_mac/src/AppKit/GTMNSBezierPath+RoundRect.h"
#import "third_party/google_toolbox_for_mac/src/AppKit/GTMNSColor+Luminance.h"
+#include "ui/base/cocoa/cocoa_base_utils.h"
#include "ui/base/cocoa/window_size_constants.h"
#include "ui/gfx/font_list.h"
#include "ui/gfx/geometry/point.h"
@@ -363,7 +364,8 @@ void StatusBubbleMac::SetFrameAvoidingMouse(
// To start, assume default positioning in the lower left corner.
// The window_frame position is in global (screen) coordinates.
- window_frame.origin = [parent_ convertBaseToScreen:base_rect.origin];
+ window_frame.origin =
+ ui::ConvertPointFromWindowToScreen(parent_, base_rect.origin);
// Get the cursor position relative to the top right corner of the bubble.
gfx::Point relative_pos(mouse_pos.x() - NSMaxX(window_frame),
@@ -811,7 +813,7 @@ NSRect StatusBubbleMac::CalculateWindowFrame(bool expanded_width) {
NSRect screenRect;
if ([delegate_ respondsToSelector:@selector(statusBubbleBaseFrame)]) {
screenRect = [delegate_ statusBubbleBaseFrame];
- screenRect.origin = [parent_ convertBaseToScreen:screenRect.origin];
+ screenRect = [parent_ convertRectToScreen:screenRect];
} else {
screenRect = [parent_ frame];
}
« no previous file with comments | « chrome/browser/ui/cocoa/profiles/avatar_base_controller.mm ('k') | chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698