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

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

Issue 10830353: Introduce InfoBarTabService API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Respond to review comments Created 8 years, 4 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #include "base/logging.h" // for NOTREACHED() 7 #include "base/logging.h" // for NOTREACHED()
8 #include "base/mac/bundle_locations.h" 8 #include "base/mac/bundle_locations.h"
9 #include "base/mac/mac_util.h" 9 #include "base/mac/mac_util.h"
10 #include "base/sys_string_conversions.h" 10 #include "base/sys_string_conversions.h"
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 if (delegate_->AsConfirmInfoBarDelegate()->LinkClicked(disposition)) 444 if (delegate_->AsConfirmInfoBarDelegate()->LinkClicked(disposition))
445 [self removeSelf]; 445 [self removeSelf];
446 } 446 }
447 447
448 @end 448 @end
449 449
450 450
451 ////////////////////////////////////////////////////////////////////////// 451 //////////////////////////////////////////////////////////////////////////
452 // CreateInfoBar() implementations 452 // CreateInfoBar() implementations
453 453
454 InfoBar* LinkInfoBarDelegate::CreateInfoBar(InfoBarTabHelper* owner) { 454 InfoBar* LinkInfoBarDelegate::CreateInfoBar(InfoBarTabService* owner) {
455 InfoBarTabHelper* helper = (InfoBarTabHelper*)owner;
455 LinkInfoBarController* controller = 456 LinkInfoBarController* controller =
456 [[LinkInfoBarController alloc] initWithDelegate:this owner:owner]; 457 [[LinkInfoBarController alloc] initWithDelegate:this owner:helper];
457 return new InfoBar(controller, this); 458 return new InfoBar(controller, this);
458 } 459 }
459 460
460 InfoBar* ConfirmInfoBarDelegate::CreateInfoBar(InfoBarTabHelper* owner) { 461 InfoBar* ConfirmInfoBarDelegate::CreateInfoBar(InfoBarTabService* owner) {
462 InfoBarTabHelper* helper = (InfoBarTabHelper*)owner;
461 ConfirmInfoBarController* controller = 463 ConfirmInfoBarController* controller =
462 [[ConfirmInfoBarController alloc] initWithDelegate:this owner:owner]; 464 [[ConfirmInfoBarController alloc] initWithDelegate:this owner:helper];
463 return new InfoBar(controller, this); 465 return new InfoBar(controller, this);
464 } 466 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698