diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-02 21:41:34 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-02 21:41:34 +0000 |
commit | c31f84b5853f9584545c26bd1eca0e588616cf7d (patch) | |
tree | f2eb34d4dfeecfdf855b039c8d67606055b97c5c /chrome/browser/geolocation/geolocation_permission_context_unittest.cc | |
parent | be0a2cfd5ff6d24015c34334250515235e7e8638 (diff) | |
download | chromium_src-c31f84b5853f9584545c26bd1eca0e588616cf7d.zip chromium_src-c31f84b5853f9584545c26bd1eca0e588616cf7d.tar.gz chromium_src-c31f84b5853f9584545c26bd1eca0e588616cf7d.tar.bz2 |
Change InfoBar-related notifications to be sourced from a TabContentsWrapper, not a TabContents. Also change the notifications' Details to be more like what they will ultimately become once TCW owns the InfoBars, by adding a bool to the REMOVED notification for animation state, and changing the "add"-related args from InfoBarDelegate* to InfoBar*. (I can't yet change the removed infobar delegate args similarly because TabContentsWrapper current has no way to map back from an InfoBarDelegate* to a corresponding Infobar*.)
BUG=62154
TEST=none
Review URL: http://codereview.chromium.org/7006010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87696 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/geolocation/geolocation_permission_context_unittest.cc')
-rw-r--r-- | chrome/browser/geolocation/geolocation_permission_context_unittest.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/chrome/browser/geolocation/geolocation_permission_context_unittest.cc b/chrome/browser/geolocation/geolocation_permission_context_unittest.cc index ab73d24..dd6a395 100644 --- a/chrome/browser/geolocation/geolocation_permission_context_unittest.cc +++ b/chrome/browser/geolocation/geolocation_permission_context_unittest.cc @@ -51,7 +51,7 @@ TestTabContentsWithPendingInfoBar::TestTabContentsWithPendingInfoBar( : TabContentsWrapper( new TabContents(profile, instance, MSG_ROUTING_NONE, NULL, NULL)), removed_infobar_delegate_(NULL) { - Source<TabContents> source(tab_contents()); + Source<TabContentsWrapper> source(this); registrar_.Add(this, NotificationType::TAB_CONTENTS_INFOBAR_REMOVED, source); } @@ -63,10 +63,12 @@ void TestTabContentsWithPendingInfoBar::Observe( NotificationType type, const NotificationSource& source, const NotificationDetails& details) { - if (type.value == NotificationType::TAB_CONTENTS_INFOBAR_REMOVED) - removed_infobar_delegate_ = Details<InfoBarDelegate>(details).ptr(); - else + if (type.value == NotificationType::TAB_CONTENTS_INFOBAR_REMOVED) { + removed_infobar_delegate_ = + Details<std::pair<InfoBarDelegate*, bool> >(details)->first; + } else { TabContentsWrapper::Observe(type, source, details); + } } } // namespace |