diff options
author | sdefresne <sdefresne@chromium.org> | 2014-12-22 09:30:59 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-12-22 17:31:51 +0000 |
commit | 316da458d4d1ea846f078efaf71ae1f23964f42e (patch) | |
tree | 97be3296df5195fdd697ab72738145d800b5f93c /ios | |
parent | a84772b7edfdc4f83e0b6b0831085657a8818334 (diff) | |
download | chromium_src-316da458d4d1ea846f078efaf71ae1f23964f42e.zip chromium_src-316da458d4d1ea846f078efaf71ae1f23964f42e.tar.gz chromium_src-316da458d4d1ea846f078efaf71ae1f23964f42e.tar.bz2 |
Remove dependency of infobars component on the embedder
Add a virtual method InfoBarManager::CreateConfirmInfoBar that allow the
embedder to use UI specific implementation of ConfirmInfoBar. Port all
client code to use this virtual method instead of the static method
ConfirmInfoBarDelegate::CreateInfoBar.
Implements the InfoBarService::CreateConfirmInfoBar method for the
different UI (views, android, cocoa) and for TestInfoBarManager.
BUG=386171
TBR=jam@chromium.org
TBR=jochen@chromium.org
Review URL: https://codereview.chromium.org/812823002
Cr-Commit-Position: refs/heads/master@{#309437}
Diffstat (limited to 'ios')
-rw-r--r-- | ios/chrome/browser/infobars/confirm_infobar_delegate.mm | 21 | ||||
-rw-r--r-- | ios/chrome/ios_chrome.gyp | 1 |
2 files changed, 0 insertions, 22 deletions
diff --git a/ios/chrome/browser/infobars/confirm_infobar_delegate.mm b/ios/chrome/browser/infobars/confirm_infobar_delegate.mm deleted file mode 100644 index 47493a0..0000000 --- a/ios/chrome/browser/infobars/confirm_infobar_delegate.mm +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "components/infobars/core/confirm_infobar_delegate.h" - -#include "base/mac/scoped_nsobject.h" -#include "base/memory/scoped_ptr.h" -#include "ios/chrome/browser/infobars/confirm_infobar_controller.h" -#include "ios/chrome/browser/infobars/infobar.h" - -// This function is defined in the component, but implemented in the embedder. -// static -scoped_ptr<infobars::InfoBar> ConfirmInfoBarDelegate::CreateInfoBar( - scoped_ptr<ConfirmInfoBarDelegate> delegate) { - scoped_ptr<InfoBarIOS> infobar(new InfoBarIOS(delegate.Pass())); - base::scoped_nsobject<ConfirmInfoBarController> controller( - [[ConfirmInfoBarController alloc] initWithDelegate:infobar.get()]); - infobar->SetController(controller); - return infobar.Pass(); -} diff --git a/ios/chrome/ios_chrome.gyp b/ios/chrome/ios_chrome.gyp index 04c3c2a..fbdfc03 100644 --- a/ios/chrome/ios_chrome.gyp +++ b/ios/chrome/ios_chrome.gyp @@ -37,7 +37,6 @@ 'browser/browser_state/browser_state_otr_helper.h', 'browser/infobars/confirm_infobar_controller.h', 'browser/infobars/confirm_infobar_controller.mm', - 'browser/infobars/confirm_infobar_delegate.mm', 'browser/infobars/infobar.h', 'browser/infobars/infobar.mm', 'browser/infobars/infobar_container_ios.h', |