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

Side by Side Diff: ui/app_list/cocoa/apps_grid_view_item.mm

Issue 13926010: ui/app_list: Remove unnecessary scoped_ptr ".get()" calls. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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
« no previous file with comments | « no previous file | ui/app_list/pagination_model.cc » ('j') | ui/app_list/views/search_result_view.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "ui/app_list/cocoa/apps_grid_view_item.h" 5 #import "ui/app_list/cocoa/apps_grid_view_item.h"
6 6
7 #include "base/mac/foundation_util.h" 7 #include "base/mac/foundation_util.h"
8 #include "base/memory/scoped_nsobject.h" 8 #include "base/memory/scoped_nsobject.h"
9 #include "base/strings/sys_string_conversions.h" 9 #include "base/strings/sys_string_conversions.h"
10 #include "skia/ext/skia_utils_mac.h" 10 #include "skia/ext/skia_utils_mac.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 if (!itemModel) { 172 if (!itemModel) {
173 observerBridge_.reset(); 173 observerBridge_.reset();
174 return; 174 return;
175 } 175 }
176 176
177 NSButton* button = [self button]; 177 NSButton* button = [self button];
178 [button setTitle:base::SysUTF8ToNSString(itemModel->title())]; 178 [button setTitle:base::SysUTF8ToNSString(itemModel->title())];
179 [button setImage:gfx::NSImageFromImageSkia(itemModel->icon())]; 179 [button setImage:gfx::NSImageFromImageSkia(itemModel->icon())];
180 observerBridge_.reset(new app_list::ItemModelObserverBridge(self, itemModel)); 180 observerBridge_.reset(new app_list::ItemModelObserverBridge(self, itemModel));
181 181
182 if (trackingArea_.get()) 182 if (trackingArea_)
xiyuan 2013/04/16 22:37:20 This is probably does not compile. |trackingArea_|
tfarina 2013/04/16 23:15:48 backed out.
183 [[self view] removeTrackingArea:trackingArea_.get()]; 183 [[self view] removeTrackingArea:trackingArea_.get()];
184 184
185 trackingArea_.reset( 185 trackingArea_.reset(
186 [[CrTrackingArea alloc] initWithRect:NSZeroRect 186 [[CrTrackingArea alloc] initWithRect:NSZeroRect
187 options:NSTrackingInVisibleRect | 187 options:NSTrackingInVisibleRect |
188 NSTrackingMouseEnteredAndExited | 188 NSTrackingMouseEnteredAndExited |
189 NSTrackingActiveInKeyWindow 189 NSTrackingActiveInKeyWindow
190 owner:self 190 owner:self
191 userInfo:nil]); 191 userInfo:nil]);
192 [[self view] addTrackingArea:trackingArea_.get()]; 192 [[self view] addTrackingArea:trackingArea_.get()];
(...skipping 20 matching lines...) Expand all
213 - (void)mouseExited:(NSEvent*)theEvent { 213 - (void)mouseExited:(NSEvent*)theEvent {
214 [self setSelected:NO]; 214 [self setSelected:NO];
215 } 215 }
216 216
217 - (void)setSelected:(BOOL)flag { 217 - (void)setSelected:(BOOL)flag {
218 [[self itemBackgroundView] setSelected:flag]; 218 [[self itemBackgroundView] setSelected:flag];
219 [super setSelected:flag]; 219 [super setSelected:flag];
220 } 220 }
221 221
222 @end 222 @end
OLDNEW
« no previous file with comments | « no previous file | ui/app_list/pagination_model.cc » ('j') | ui/app_list/views/search_result_view.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698