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

Side by Side Diff: chrome/browser/ui/cocoa/status_bubble_mac.mm

Issue 572853002: Realigning the WeakPtrFactory initialization order in chrome/ui folder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed mac error Created 6 years, 3 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
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/cocoa/status_bubble_mac.h" 5 #include "chrome/browser/ui/cocoa/status_bubble_mac.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 // At this point, -animationForKey should have been called by CoreAnimation 136 // At this point, -animationForKey should have been called by CoreAnimation
137 // to set up the animation to run. Verify this. 137 // to set up the animation to run. Verify this.
138 DCHECK(completionHandler_ == nil); 138 DCHECK(completionHandler_ == nil);
139 [NSAnimationContext endGrouping]; 139 [NSAnimationContext endGrouping];
140 } 140 }
141 } 141 }
142 142
143 @end 143 @end
144 144
145 StatusBubbleMac::StatusBubbleMac(NSWindow* parent, id delegate) 145 StatusBubbleMac::StatusBubbleMac(NSWindow* parent, id delegate)
146 : timer_factory_(this), 146 : parent_(parent),
147 expand_timer_factory_(this),
148 completion_handler_factory_(this),
149 parent_(parent),
150 delegate_(delegate), 147 delegate_(delegate),
151 window_(nil), 148 window_(nil),
152 status_text_(nil), 149 status_text_(nil),
153 url_text_(nil), 150 url_text_(nil),
154 state_(kBubbleHidden), 151 state_(kBubbleHidden),
155 immediate_(false), 152 immediate_(false),
156 is_expanded_(false) { 153 is_expanded_(false),
154 timer_factory_(this),
155 expand_timer_factory_(this),
156 completion_handler_factory_(this) {
157 Create(); 157 Create();
158 Attach(); 158 Attach();
159 } 159 }
160 160
161 StatusBubbleMac::~StatusBubbleMac() { 161 StatusBubbleMac::~StatusBubbleMac() {
162 DCHECK(window_); 162 DCHECK(window_);
163 163
164 Hide(); 164 Hide();
165 165
166 completion_handler_factory_.InvalidateWeakPtrs(); 166 completion_handler_factory_.InvalidateWeakPtrs();
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 } 775 }
776 776
777 // Round the top corners when the bubble is below the parent window. 777 // Round the top corners when the bubble is below the parent window.
778 if (NSMinY(window_frame) < NSMinY(parent_frame)) { 778 if (NSMinY(window_frame) < NSMinY(parent_frame)) {
779 corner_flags |= kRoundedTopLeftCorner | kRoundedTopRightCorner; 779 corner_flags |= kRoundedTopLeftCorner | kRoundedTopRightCorner;
780 } 780 }
781 } 781 }
782 782
783 return corner_flags; 783 return corner_flags;
784 } 784 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/status_bubble_mac.h ('k') | chrome/browser/ui/webui/chromeos/login/kiosk_app_menu_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698