1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/ui/cocoa/infobars/infobar_cocoa.h"
7 #import "chrome/browser/ui/cocoa/infobars/infobar_controller.h"
9 InfoBarCocoa::InfoBarCocoa(scoped_ptr<infobars::InfoBarDelegate> delegate)
10 : infobars::InfoBar(delegate.Pass()),
11 weak_ptr_factory_(this) {
14 InfoBarCocoa::~InfoBarCocoa() {
16 [controller() infobarWillClose];
19 infobars::InfoBarManager* InfoBarCocoa::OwnerCocoa() { return owner(); }
21 base::WeakPtr<InfoBarCocoa> InfoBarCocoa::GetWeakPtr() {
22 return weak_ptr_factory_.GetWeakPtr();