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

Side by Side Diff: chrome/browser/ui/cocoa/infobars/confirm_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 #include "chrome/browser/ui/cocoa/infobars/confirm_infobar_controller.h" 5 #include "chrome/browser/ui/cocoa/infobars/confirm_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 #include "chrome/browser/infobars/confirm_infobar_delegate.h" 9 #include "chrome/browser/infobars/confirm_infobar_delegate.h"
10 #import "chrome/browser/ui/cocoa/hyperlink_text_view.h" 10 #import "chrome/browser/ui/cocoa/hyperlink_text_view.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 return; 131 return;
132 WindowOpenDisposition disposition = 132 WindowOpenDisposition disposition =
133 ui::WindowOpenDispositionFromNSEvent([NSApp currentEvent]); 133 ui::WindowOpenDispositionFromNSEvent([NSApp currentEvent]);
134 if ([self delegate]->AsConfirmInfoBarDelegate()->LinkClicked(disposition)) 134 if ([self delegate]->AsConfirmInfoBarDelegate()->LinkClicked(disposition))
135 [self removeSelf]; 135 [self removeSelf];
136 } 136 }
137 137
138 @end 138 @end
139 139
140 // static 140 // static
141 scoped_ptr<InfoBar> ConfirmInfoBarDelegate::CreateInfoBar( 141 scoped_ptr<infobars::InfoBar> ConfirmInfoBarDelegate::CreateInfoBar(
142 scoped_ptr<ConfirmInfoBarDelegate> delegate) { 142 scoped_ptr<ConfirmInfoBarDelegate> delegate) {
143 scoped_ptr<InfoBarCocoa> infobar( 143 scoped_ptr<InfoBarCocoa> infobar(
144 new InfoBarCocoa(delegate.PassAs<InfoBarDelegate>())); 144 new InfoBarCocoa(delegate.PassAs<infobars::InfoBarDelegate>()));
145 base::scoped_nsobject<ConfirmInfoBarController> controller( 145 base::scoped_nsobject<ConfirmInfoBarController> controller(
146 [[ConfirmInfoBarController alloc] initWithInfoBar:infobar.get()]); 146 [[ConfirmInfoBarController alloc] initWithInfoBar:infobar.get()]);
147 infobar->set_controller(controller); 147 infobar->set_controller(controller);
148 return infobar.PassAs<InfoBar>(); 148 return infobar.PassAs<infobars::InfoBar>();
149 } 149 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698