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

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

Issue 393763002: MacViews: Refactor ShowConfirmBubble to also take a gfx::NativeWindow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: new approach: extra argument Created 6 years, 5 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 | « chrome/browser/renderer_context_menu/spelling_menu_observer.cc ('k') | chrome/browser/ui/confirm_bubble.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/confirm_bubble_cocoa.mm
diff --git a/chrome/browser/ui/cocoa/confirm_bubble_cocoa.mm b/chrome/browser/ui/cocoa/confirm_bubble_cocoa.mm
index 8d6193b2c169c8be2d1e8f4706950e33f9bcd566..3e057738e02f4d6095a0f6f1984469af0e2fa1ca 100644
--- a/chrome/browser/ui/cocoa/confirm_bubble_cocoa.mm
+++ b/chrome/browser/ui/cocoa/confirm_bubble_cocoa.mm
@@ -44,20 +44,21 @@ const int kButtonHEdgeMargin = 7;
namespace chrome {
-void ShowConfirmBubble(gfx::NativeView view,
+void ShowConfirmBubble(gfx::NativeWindow window,
+ gfx::NativeView anchor_view,
const gfx::Point& origin,
ConfirmBubbleModel* model) {
// Create a custom NSViewController that manages a bubble view, and add it to
- // a child to the specified view. This controller will be automatically
- // deleted when it loses first-responder status.
+ // a child to the specified |anchor_view|. This controller will be
+ // automatically deleted when it loses first-responder status.
ConfirmBubbleController* controller =
- [[ConfirmBubbleController alloc] initWithParent:view
+ [[ConfirmBubbleController alloc] initWithParent:anchor_view
origin:origin.ToCGPoint()
model:model];
- [view addSubview:[controller view]
- positioned:NSWindowAbove
- relativeTo:nil];
- [[view window] makeFirstResponder:[controller view]];
+ [anchor_view addSubview:[controller view]
+ positioned:NSWindowAbove
+ relativeTo:nil];
+ [[anchor_view window] makeFirstResponder:[controller view]];
}
} // namespace chrome
« no previous file with comments | « chrome/browser/renderer_context_menu/spelling_menu_observer.cc ('k') | chrome/browser/ui/confirm_bubble.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698