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

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

Issue 10885024: Integrate Chrome To Mobile with Action Box UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Disable ShowChromeToMobileBubble on GTK. Created 8 years, 4 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/chrome_to_mobile_bubble_controller.mm
diff --git a/chrome/browser/ui/cocoa/chrome_to_mobile_bubble_controller.mm b/chrome/browser/ui/cocoa/chrome_to_mobile_bubble_controller.mm
index ae823a96b2e42a973397236d5126125fadfe0a78..f21b2dcddc8601881b9691934004c04357d7c303 100644
--- a/chrome/browser/ui/cocoa/chrome_to_mobile_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/chrome_to_mobile_bubble_controller.mm
@@ -146,23 +146,16 @@ void ChromeToMobileBubbleNotificationBridge::OnSendComplete(bool success) {
browserWindowControllerForWindow:self.parentWindow];
if (controller != nil) {
LocationBarViewMac* locationBar = [controller locationBarBridge];
- NSPoint bubblePoint;
- if (extensions::switch_utils::IsExtensionsInActionBoxEnabled()) {
- bubblePoint = locationBar->GetActionBoxAnchorPoint();
- bubblePoint = [self.parentWindow convertBaseToScreen:bubblePoint];
- // Without an arrow, the anchor point of a bubble is the top left corner,
- // but GetActionBoxAnchorPoint returns the top right corner.
- bubblePoint.x -= self.bubble.frame.size.width;
- [self.bubble setArrowLocation:info_bubble::kNoArrow];
- [self.bubble setCornerFlags:info_bubble::kRoundedBottomCorners];
- [self.bubble setAlignment:info_bubble::kAlignEdgeToAnchorEdge];
- [window setContentSize:self.bubble.frame.size];
- [window setContentView:self.bubble];
- } else {
- bubblePoint = locationBar->GetChromeToMobileBubblePoint();
- bubblePoint = [self.parentWindow convertBaseToScreen:bubblePoint];
- [self.bubble setArrowLocation:info_bubble::kTopRight];
- }
+ NSPoint bubblePoint = locationBar->GetActionBoxAnchorPoint();
+ bubblePoint = [self.parentWindow convertBaseToScreen:bubblePoint];
+ // Without an arrow, the anchor point of a bubble is the top left corner,
+ // but GetActionBoxAnchorPoint returns the top right corner.
+ bubblePoint.x -= self.bubble.frame.size.width;
+ [self.bubble setArrowLocation:info_bubble::kNoArrow];
+ [self.bubble setCornerFlags:info_bubble::kRoundedBottomCorners];
+ [self.bubble setAlignment:info_bubble::kAlignEdgeToAnchorEdge];
+ [window setContentSize:self.bubble.frame.size];
+ [window setContentView:self.bubble];
[self setAnchorPoint:bubblePoint];
}

Powered by Google App Engine
This is Rietveld 408576698