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

Unified Diff: chrome/browser/cocoa/bookmark_bubble_controller.mm

Issue 1540009: [Mac] Move star button into page-actions area of omnibox. (Closed)
Patch Set: Why did the trybot fail? I can't see anything. Created 10 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/cocoa/bookmark_bubble_controller.mm
diff --git a/chrome/browser/cocoa/bookmark_bubble_controller.mm b/chrome/browser/cocoa/bookmark_bubble_controller.mm
index 075034c3e9700bfeaf2c54d79a7d651266b713d3..e59d1f6e67a832f7cd237426242a24d132a62509 100644
--- a/chrome/browser/cocoa/bookmark_bubble_controller.mm
+++ b/chrome/browser/cocoa/bookmark_bubble_controller.mm
@@ -7,6 +7,7 @@
#include "base/mac_util.h"
#include "base/sys_string_conversions.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
+#import "chrome/browser/cocoa/info_bubble_view.h"
#include "chrome/browser/metrics/user_metrics.h"
#include "grit/generated_resources.h"
@@ -38,7 +39,7 @@
}
- (id)initWithParentWindow:(NSWindow*)parentWindow
- topLeftForBubble:(NSPoint)topLeftForBubble
+ topRightForBubble:(NSPoint)topRightForBubble
model:(BookmarkModel*)model
node:(const BookmarkNode*)node
alreadyBookmarked:(BOOL)alreadyBookmarked {
@@ -47,7 +48,7 @@
ofType:@"nib"];
if ((self = [super initWithWindowNibPath:nibPath owner:self])) {
parentWindow_ = parentWindow;
- topLeftForBubble_ = topLeftForBubble;
+ topRightForBubble_ = topRightForBubble;
model_ = model;
node_ = node;
alreadyBookmarked_ = alreadyBookmarked;
@@ -95,9 +96,11 @@
// showWindow:. Thus, we have our own version.
- (void)showWindow:(id)sender {
NSWindow* window = [self window]; // completes nib load
- NSPoint origin = [parentWindow_ convertBaseToScreen:topLeftForBubble_];
+ NSPoint origin = [parentWindow_ convertBaseToScreen:topRightForBubble_];
origin.y -= NSHeight([window frame]);
+ origin.x -= NSWidth([window frame]);
[window setFrameOrigin:origin];
+ [bubble_ setArrowLocation:kTopRight];
[parentWindow_ addChildWindow:window ordered:NSWindowAbove];
// Default is IDS_BOOMARK_BUBBLE_PAGE_BOOKMARK; "Bookmark".
// If adding for the 1st time the string becomes "Bookmark Added!"
« no previous file with comments | « chrome/browser/cocoa/bookmark_bubble_controller.h ('k') | chrome/browser/cocoa/bookmark_bubble_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698