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

Side by Side Diff: chrome/browser/ui/cocoa/infobars/alternate_nav_infobar_controller.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 #import "chrome/browser/ui/cocoa/infobars/alternate_nav_infobar_controller.h" 5 #import "chrome/browser/ui/cocoa/infobars/alternate_nav_infobar_controller.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/sys_string_conversions.h" 8 #include "base/strings/sys_string_conversions.h"
9 #import "chrome/browser/ui/cocoa/hyperlink_text_view.h" 9 #import "chrome/browser/ui/cocoa/hyperlink_text_view.h"
10 #include "chrome/browser/ui/cocoa/infobars/infobar_cocoa.h" 10 #include "chrome/browser/ui/cocoa/infobars/infobar_cocoa.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 ui::WindowOpenDispositionFromNSEvent([NSApp currentEvent]); 51 ui::WindowOpenDispositionFromNSEvent([NSApp currentEvent]);
52 AlternateNavInfoBarDelegate* delegate = 52 AlternateNavInfoBarDelegate* delegate =
53 static_cast<AlternateNavInfoBarDelegate*>([self delegate]); 53 static_cast<AlternateNavInfoBarDelegate*>([self delegate]);
54 if (delegate->LinkClicked(disposition)) 54 if (delegate->LinkClicked(disposition))
55 [self removeSelf]; 55 [self removeSelf];
56 } 56 }
57 57
58 @end 58 @end
59 59
60 // static 60 // static
61 scoped_ptr<InfoBar> AlternateNavInfoBarDelegate::CreateInfoBar( 61 scoped_ptr<infobars::InfoBar> AlternateNavInfoBarDelegate::CreateInfoBar(
62 scoped_ptr<AlternateNavInfoBarDelegate> delegate) { 62 scoped_ptr<AlternateNavInfoBarDelegate> delegate) {
63 scoped_ptr<InfoBarCocoa> infobar( 63 scoped_ptr<InfoBarCocoa> infobar(
64 new InfoBarCocoa(delegate.PassAs<InfoBarDelegate>())); 64 new InfoBarCocoa(delegate.PassAs<infobars::InfoBarDelegate>()));
65 base::scoped_nsobject<AlternateNavInfoBarController> controller( 65 base::scoped_nsobject<AlternateNavInfoBarController> controller(
66 [[AlternateNavInfoBarController alloc] initWithInfoBar:infobar.get()]); 66 [[AlternateNavInfoBarController alloc] initWithInfoBar:infobar.get()]);
67 infobar->set_controller(controller); 67 infobar->set_controller(controller);
68 return infobar.PassAs<InfoBar>(); 68 return infobar.PassAs<infobars::InfoBar>();
69 } 69 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/chrome_select_file_policy.cc ('k') | chrome/browser/ui/cocoa/infobars/confirm_infobar_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698