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

Side by Side Diff: chrome/browser/ui/cocoa/tabs/tab_controller.mm

Issue 699013002: [Cocoa] Crash fix, caused by recent tab indicator change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #import "chrome/browser/ui/cocoa/tabs/tab_controller.h" 5 #import "chrome/browser/ui/cocoa/tabs/tab_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/i18n/rtl.h" 10 #include "base/i18n/rtl.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 selector:@selector(themeChangedNotification:) 121 selector:@selector(themeChangedNotification:)
122 name:kBrowserThemeDidChangeNotification 122 name:kBrowserThemeDidChangeNotification
123 object:nil]; 123 object:nil];
124 124
125 [self internalSetSelected:selected_]; 125 [self internalSetSelected:selected_];
126 } 126 }
127 return self; 127 return self;
128 } 128 }
129 129
130 - (void)dealloc { 130 - (void)dealloc {
131 if (mediaIndicatorButton_) {
Nico 2014/11/04 00:01:22 (nit: not needed, messages to nil are silently ign
miu 2014/11/04 00:22:29 Done.
132 [mediaIndicatorButton_ setAnimationDoneTarget:nil withAction:nil];
133 [mediaIndicatorButton_ setClickTarget:nil withAction:nil];
134 }
131 [[NSNotificationCenter defaultCenter] removeObserver:self]; 135 [[NSNotificationCenter defaultCenter] removeObserver:self];
132 [[self tabView] setController:nil]; 136 [[self tabView] setController:nil];
133 [super dealloc]; 137 [super dealloc];
134 } 138 }
135 139
136 // The internals of |-setSelected:| and |-setActive:| but doesn't set the 140 // The internals of |-setSelected:| and |-setActive:| but doesn't set the
137 // backing variables. This updates the drawing state and marks self as needing 141 // backing variables. This updates the drawing state and marks self as needing
138 // a re-draw. 142 // a re-draw.
139 - (void)internalSetSelected:(BOOL)selected { 143 - (void)internalSetSelected:(BOOL)selected {
140 TabView* tabView = [self tabView]; 144 TabView* tabView = [self tabView];
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 // TabStripDragController. 449 // TabStripDragController.
446 - (BOOL)tabCanBeDragged:(TabController*)controller { 450 - (BOOL)tabCanBeDragged:(TabController*)controller {
447 return [[target_ dragController] tabCanBeDragged:controller]; 451 return [[target_ dragController] tabCanBeDragged:controller];
448 } 452 }
449 453
450 - (void)maybeStartDrag:(NSEvent*)event forTab:(TabController*)tab { 454 - (void)maybeStartDrag:(NSEvent*)event forTab:(TabController*)tab {
451 [[target_ dragController] maybeStartDrag:event forTab:tab]; 455 [[target_ dragController] maybeStartDrag:event forTab:tab];
452 } 456 }
453 457
454 @end 458 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698