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

Side by Side Diff: chrome/browser/ui/cocoa/infobars/infobar_cocoa.mm

Issue 240193003: Move Infobars core files to the Infobars component (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix nib name on mac Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/cocoa/infobars/infobar_cocoa.h" 5 #include "chrome/browser/ui/cocoa/infobars/infobar_cocoa.h"
6 6
7 #import "chrome/browser/ui/cocoa/infobars/infobar_controller.h" 7 #import "chrome/browser/ui/cocoa/infobars/infobar_controller.h"
8 8
9 const int InfoBar::kSeparatorLineHeight = 1; 9 const int infobars::InfoBar::kSeparatorLineHeight = 1;
10 const int InfoBar::kDefaultArrowTargetHeight = 11; 10 const int infobars::InfoBar::kDefaultArrowTargetHeight = 11;
11 const int InfoBar::kMaximumArrowTargetHeight = 24; 11 const int infobars::InfoBar::kMaximumArrowTargetHeight = 24;
12 const int InfoBar::kDefaultArrowTargetHalfWidth = kDefaultArrowTargetHeight; 12 const int infobars::InfoBar::kDefaultArrowTargetHalfWidth =
13 const int InfoBar::kMaximumArrowTargetHalfWidth = 14; 13 kDefaultArrowTargetHeight;
14 const int InfoBar::kDefaultBarTargetHeight = 36; 14 const int infobars::InfoBar::kMaximumArrowTargetHalfWidth = 14;
15 const int infobars::InfoBar::kDefaultBarTargetHeight = 36;
15 16
16 InfoBarCocoa::InfoBarCocoa(scoped_ptr<InfoBarDelegate> delegate) 17 InfoBarCocoa::InfoBarCocoa(scoped_ptr<infobars::InfoBarDelegate> delegate)
17 : InfoBar(delegate.Pass()), 18 : infobars::InfoBar(delegate.Pass()),
18 weak_ptr_factory_(this) { 19 weak_ptr_factory_(this) {
19 } 20 }
20 21
21 InfoBarCocoa::~InfoBarCocoa() { 22 InfoBarCocoa::~InfoBarCocoa() {
22 if (controller()) 23 if (controller())
23 [controller() infobarWillClose]; 24 [controller() infobarWillClose];
24 } 25 }
25 26
26 InfoBarManager* InfoBarCocoa::OwnerCocoa() { 27 infobars::InfoBarManager* InfoBarCocoa::OwnerCocoa() { return owner(); }
27 return owner();
28 }
29 28
30 base::WeakPtr<InfoBarCocoa> InfoBarCocoa::GetWeakPtr() { 29 base::WeakPtr<InfoBarCocoa> InfoBarCocoa::GetWeakPtr() {
31 return weak_ptr_factory_.GetWeakPtr(); 30 return weak_ptr_factory_.GetWeakPtr();
32 } 31 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/infobars/infobar_cocoa.h ('k') | chrome/browser/ui/cocoa/infobars/infobar_container_cocoa.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698