Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / infobars / infobar_cocoa.mm
blobb49579c4b9b18a61c4a9f7c9badf26cdc298e8be
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 const int InfoBar::kSeparatorLineHeight = 1;
10 const int InfoBar::kDefaultArrowTargetHeight = 11;
11 const int InfoBar::kMaximumArrowTargetHeight = 24;
12 const int InfoBar::kDefaultArrowTargetHalfWidth = kDefaultArrowTargetHeight;
13 const int InfoBar::kMaximumArrowTargetHalfWidth = 14;
14 const int InfoBar::kDefaultBarTargetHeight = 36;
16 InfoBarCocoa::InfoBarCocoa(scoped_ptr<InfoBarDelegate> delegate)
17     : InfoBar(delegate.Pass()),
18       weak_ptr_factory_(this) {
21 InfoBarCocoa::~InfoBarCocoa() {
22   if (controller())
23     [controller() infobarWillClose];
26 InfoBarService* InfoBarCocoa::OwnerCocoa() {
27   return owner();
30 base::WeakPtr<InfoBarCocoa> InfoBarCocoa::GetWeakPtr() {
31   return weak_ptr_factory_.GetWeakPtr();