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

Side by Side Diff: chrome/browser/ui/cocoa/media_picker/desktop_media_picker_item.mm

Issue 2168853003: Mac Picker UI: Screen Auto Selection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Unittest Created 4 years, 5 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
« no previous file with comments | « chrome/browser/ui/cocoa/media_picker/desktop_media_picker_item.h ('k') | 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 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 "chrome/browser/ui/cocoa/media_picker/desktop_media_picker_item.h" 5 #import "chrome/browser/ui/cocoa/media_picker/desktop_media_picker_item.h"
6 6
7 #import <Quartz/Quartz.h> 7 #import <Quartz/Quartz.h>
8 8
9 #include "chrome/browser/media/desktop_media_list.h" 9 #include "chrome/browser/media/desktop_media_list.h"
10 10
11 @implementation DesktopMediaPickerItem 11 @implementation DesktopMediaPickerItem
12 12
13 @synthesize titleHidden = titleHidden_;
14
13 - (id)initWithSourceId:(content::DesktopMediaID)sourceID 15 - (id)initWithSourceId:(content::DesktopMediaID)sourceID
14 imageUID:(int)imageUID 16 imageUID:(int)imageUID
15 imageTitle:(NSString*)imageTitle { 17 imageTitle:(NSString*)imageTitle {
16 if ((self = [super init])) { 18 if ((self = [super init])) {
17 sourceID_ = sourceID; 19 sourceID_ = sourceID;
18 imageUID_.reset([[NSString stringWithFormat:@"%d", imageUID] retain]); 20 imageUID_.reset([[NSString stringWithFormat:@"%d", imageUID] retain]);
19 imageTitle_.reset([imageTitle retain]); 21 imageTitle_.reset([imageTitle retain]);
20 } 22 }
21 return self; 23 return self;
22 } 24 }
(...skipping 15 matching lines...) Expand all
38 40
39 - (NSString*)imageUID { 41 - (NSString*)imageUID {
40 return imageUID_; 42 return imageUID_;
41 } 43 }
42 44
43 - (NSString*)imageRepresentationType { 45 - (NSString*)imageRepresentationType {
44 return IKImageBrowserNSImageRepresentationType; 46 return IKImageBrowserNSImageRepresentationType;
45 } 47 }
46 48
47 - (NSString*)imageTitle { 49 - (NSString*)imageTitle {
48 return imageTitle_.get(); 50 return titleHidden_ ? nil : imageTitle_;
49 } 51 }
50 52
51 - (NSUInteger)imageVersion { 53 - (NSUInteger)imageVersion {
52 return imageVersion_; 54 return imageVersion_;
53 } 55 }
54 56
55 - (id)imageRepresentation { 57 - (id)imageRepresentation {
56 return image_.get(); 58 return image_.get();
57 } 59 }
58 60
59 @end // @interface DesktopMediaPickerItem 61 @end // @interface DesktopMediaPickerItem
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/media_picker/desktop_media_picker_item.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698