diff options
author | johnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-15 21:35:17 +0000 |
---|---|---|
committer | johnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-15 21:35:17 +0000 |
commit | b2e7760097553ce72b13180dffbf4890bae02d07 (patch) | |
tree | 6f4ba8a5423d90a6535a016e28ff5b65b596c412 /chrome/browser/views | |
parent | a317d315b96075149e4de5ba9f274b4d95799bd5 (diff) | |
download | chromium_src-b2e7760097553ce72b13180dffbf4890bae02d07.zip chromium_src-b2e7760097553ce72b13180dffbf4890bae02d07.tar.gz chromium_src-b2e7760097553ce72b13180dffbf4890bae02d07.tar.bz2 |
Implement BalloonView::Update on all platforms to navigate a notification balloon to the new content url; this is the last piece for replace-id support in notifications.
BUG=none
TEST=use replaceId feature for notifications
Review URL: http://codereview.chromium.org/2955009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52540 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views')
-rw-r--r-- | chrome/browser/views/notifications/balloon_view.cc | 7 | ||||
-rw-r--r-- | chrome/browser/views/notifications/balloon_view.h | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/chrome/browser/views/notifications/balloon_view.cc b/chrome/browser/views/notifications/balloon_view.cc index ec9aa95..c89280b 100644 --- a/chrome/browser/views/notifications/balloon_view.cc +++ b/chrome/browser/views/notifications/balloon_view.cc @@ -205,6 +205,13 @@ void BalloonViewImpl::RepositionToBalloon() { animation_->Show(); } +void BalloonViewImpl::Update() { + DCHECK(html_contents_.get()) << "BalloonView::Update called before Show"; + if (html_contents_->render_view_host()) + html_contents_->render_view_host()->NavigateToURL( + balloon_->notification().content_url()); +} + void BalloonViewImpl::AnimationProgressed(const Animation* animation) { DCHECK(animation == animation_.get()); diff --git a/chrome/browser/views/notifications/balloon_view.h b/chrome/browser/views/notifications/balloon_view.h index d1b0636..6f10bd2 100644 --- a/chrome/browser/views/notifications/balloon_view.h +++ b/chrome/browser/views/notifications/balloon_view.h @@ -56,7 +56,7 @@ class BalloonViewImpl : public BalloonView, // BalloonView interface. virtual void Show(Balloon* balloon); - virtual void Update() {} + virtual void Update(); virtual void RepositionToBalloon(); virtual void Close(bool by_user); virtual gfx::Size GetSize() const; |