| Index: chrome/browser/ui/cocoa/confirm_bubble_model.mm
|
| ===================================================================
|
| --- chrome/browser/ui/cocoa/confirm_bubble_model.mm (revision 0)
|
| +++ chrome/browser/ui/cocoa/confirm_bubble_model.mm (revision 0)
|
| @@ -0,0 +1,24 @@
|
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "chrome/browser/ui/confirm_bubble_model.h"
|
| +
|
| +#include "chrome/browser/ui/cocoa/confirm_bubble_controller.h"
|
| +#include "ui/gfx/point.h"
|
| +
|
| +void ConfirmBubbleModel::Show(gfx::NativeView 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.
|
| + ConfirmBubbleController* controller =
|
| + [[ConfirmBubbleController alloc] initWithParent:view
|
| + origin:origin.ToCGPoint()
|
| + model:model];
|
| + [view addSubview:[controller view]
|
| + positioned:NSWindowAbove
|
| + relativeTo:nil];
|
| + [[view window] makeFirstResponder:[controller view]];
|
| +}
|
|
|
| Property changes on: chrome/browser/ui/cocoa/confirm_bubble_model.mm
|
| ___________________________________________________________________
|
| Added: svn:eol-style
|
| + LF
|
|
|
|
|