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

Side by Side Diff: chrome/browser/ui/views/notifications/balloon_view_views.cc

Issue 16871010: Rewrite scoped_ptr<T>(NULL) to use the default ctor in chrome/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/notifications/balloon_view_views.h" 5 #include "chrome/browser/ui/views/notifications/balloon_view_views.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 // static 87 // static
88 int BalloonView::GetHorizontalMargin() { 88 int BalloonView::GetHorizontalMargin() {
89 return kLeftMargin + kRightMargin + kLeftShadowWidth + kRightShadowWidth; 89 return kLeftMargin + kRightMargin + kLeftShadowWidth + kRightShadowWidth;
90 } 90 }
91 91
92 BalloonViewImpl::BalloonViewImpl(BalloonCollection* collection) 92 BalloonViewImpl::BalloonViewImpl(BalloonCollection* collection)
93 : balloon_(NULL), 93 : balloon_(NULL),
94 collection_(collection), 94 collection_(collection),
95 frame_container_(NULL), 95 frame_container_(NULL),
96 html_container_(NULL), 96 html_container_(NULL),
97 html_contents_(NULL),
98 close_button_(NULL), 97 close_button_(NULL),
99 animation_(NULL),
100 options_menu_model_(NULL),
101 options_menu_button_(NULL), 98 options_menu_button_(NULL),
102 enable_web_ui_(false), 99 enable_web_ui_(false),
103 closed_by_user_(false) { 100 closed_by_user_(false) {
104 // We're owned by Balloon and don't want to be deleted by our parent View. 101 // We're owned by Balloon and don't want to be deleted by our parent View.
105 set_owned_by_client(); 102 set_owned_by_client();
106 103
107 set_border(new views::BubbleBorder(views::BubbleBorder::FLOAT, 104 set_border(new views::BubbleBorder(views::BubbleBorder::FLOAT,
108 views::BubbleBorder::NO_SHADOW, SK_ColorWHITE)); 105 views::BubbleBorder::NO_SHADOW, SK_ColorWHITE));
109 } 106 }
110 107
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 return; 522 return;
526 } 523 }
527 524
528 // If the renderer process attached to this balloon is disconnected 525 // If the renderer process attached to this balloon is disconnected
529 // (e.g., because of a crash), we want to close the balloon. 526 // (e.g., because of a crash), we want to close the balloon.
530 notification_registrar_.Remove( 527 notification_registrar_.Remove(
531 this, chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED, 528 this, chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED,
532 content::Source<Balloon>(balloon_)); 529 content::Source<Balloon>(balloon_));
533 Close(false); 530 Close(false);
534 } 531 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698