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

Unified Diff: chrome/browser/chromeos/notifications/balloon_view.cc

Issue 1055005: Refactor BalloonViewHost, removing a lot of duplicate code that crept into no... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 10 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/cocoa/notifications/balloon_view_host_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/notifications/balloon_view.cc
===================================================================
--- chrome/browser/chromeos/notifications/balloon_view.cc (revision 42363)
+++ chrome/browser/chromeos/notifications/balloon_view.cc (working copy)
@@ -72,7 +72,7 @@
balloon_ = balloon;
html_contents_ = new BalloonViewHost(balloon);
- AddChildView(html_contents_);
+ AddChildView(html_contents_->view());
if (controls_) {
close_button_ = new views::TextButton(this, dismiss_text);
close_button_->SetIcon(*rb.GetBitmapNamed(IDR_BALLOON_CLOSE));
@@ -109,8 +109,9 @@
void BalloonViewImpl::Update() {
stale_ = false;
- html_contents_->render_view_host()->NavigateToURL(
- balloon_->notification().content_url());
+ if (html_contents_->render_view_host())
+ html_contents_->render_view_host()->NavigateToURL(
+ balloon_->notification().content_url());
}
void BalloonViewImpl::Close(bool by_user) {
@@ -145,7 +146,7 @@
int x = width() - button_size.width();
int y = height() - button_size.height();
- html_contents_->SetBounds(0, 0, width(), y);
+ html_contents_->view()->SetBounds(0, 0, width(), y);
if (html_contents_->render_view_host()) {
RenderWidgetHostView* view = html_contents_->render_view_host()->view();
if (view)
« no previous file with comments | « no previous file | chrome/browser/cocoa/notifications/balloon_view_host_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698