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

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

Issue 8585011: Make html_contents_ in BallonViewImpl scoped_ptr. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: will land suppression separately Created 9 years, 1 month 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 | « chrome/browser/chromeos/notifications/balloon_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/notifications/balloon_view.cc
diff --git a/chrome/browser/chromeos/notifications/balloon_view.cc b/chrome/browser/chromeos/notifications/balloon_view.cc
index 24c8dddfcd4da3876d580e1402ef7f9f7c3aaee1..e513bff7f7f5fbe75a9ce9931a1418c172e60536 100644
--- a/chrome/browser/chromeos/notifications/balloon_view.cc
+++ b/chrome/browser/chromeos/notifications/balloon_view.cc
@@ -214,7 +214,7 @@ BalloonViewImpl::~BalloonViewImpl() {
if (control_view_host_.get()) {
control_view_host_->CloseNow();
}
- if (html_contents_) {
+ if (html_contents_.get()) {
html_contents_->Shutdown();
}
}
@@ -224,7 +224,7 @@ BalloonViewImpl::~BalloonViewImpl() {
void BalloonViewImpl::Show(Balloon* balloon) {
balloon_ = balloon;
- html_contents_ = new BalloonViewHost(balloon);
+ html_contents_.reset(new BalloonViewHost(balloon));
if (web_ui_)
html_contents_->EnableWebUI();
AddChildView(html_contents_->view());
@@ -255,7 +255,7 @@ gfx::Size BalloonViewImpl::GetSize() const {
}
BalloonHost* BalloonViewImpl::GetHost() const {
- return html_contents_;
+ return html_contents_.get();
}
void BalloonViewImpl::RepositionToBalloon() {
@@ -352,7 +352,7 @@ void BalloonViewImpl::Deactivated() {
void BalloonViewImpl::DelayedClose(bool by_user) {
html_contents_->Shutdown();
- html_contents_ = NULL;
+ html_contents_.reset();
balloon_->OnClose(by_user);
}
« no previous file with comments | « chrome/browser/chromeos/notifications/balloon_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698