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

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

Issue 2168853003: Mac Picker UI: Screen Auto Selection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
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 #ifndef CHROME_BROWSER_UI_COCOA_MEDIA_PICKER_DESKTOP_MEDIA_PICKER_ITEM_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_MEDIA_PICKER_DESKTOP_MEDIA_PICKER_ITEM_H_
6 #define CHROME_BROWSER_UI_COCOA_MEDIA_PICKER_DESKTOP_MEDIA_PICKER_ITEM_H_ 6 #define CHROME_BROWSER_UI_COCOA_MEDIA_PICKER_DESKTOP_MEDIA_PICKER_ITEM_H_
7 7
8 #import <AppKit/AppKit.h> 8 #import <AppKit/AppKit.h>
9 9
10 #import "base/mac/scoped_nsobject.h" 10 #import "base/mac/scoped_nsobject.h"
11 #include "chrome/browser/media/desktop_media_list.h" 11 #include "chrome/browser/media/desktop_media_list.h"
12 12
13 // Stores the data representing a |DesktopMediaPicker| source for displaying in 13 // Stores the data representing a |DesktopMediaPicker| source for displaying in
14 // a |IKImageBrowserView|. Implements the |IKImageBrowserItem| informal 14 // a |IKImageBrowserView|. Implements the |IKImageBrowserItem| informal
15 // protocol. 15 // protocol.
16 @interface DesktopMediaPickerItem : NSObject { 16 @interface DesktopMediaPickerItem : NSObject {
17 @private 17 @private
18 content::DesktopMediaID sourceID_; 18 content::DesktopMediaID sourceID_;
19 base::scoped_nsobject<NSString> imageUID_; 19 base::scoped_nsobject<NSString> imageUID_;
20 base::scoped_nsobject<NSString> imageTitle_; 20 base::scoped_nsobject<NSString> imageTitle_;
21 base::scoped_nsobject<NSImage> image_; 21 base::scoped_nsobject<NSImage> image_;
22 NSUInteger imageVersion_; 22 NSUInteger imageVersion_;
23 bool hiddenTitle_;
tapted 2016/07/22 03:43:36 bool -> BOOL (and hiddenTitle_ -> titleHidden_)
qiangchen 2016/07/22 18:33:54 Done.
23 } 24 }
24 25
25 // Designated initializer. 26 // Designated initializer.
26 // |sourceID| is the corresponding source's ID as provided by the media list. 27 // |sourceID| is the corresponding source's ID as provided by the media list.
27 // |imageUID| is a unique number in the context of the |IKImageBrowserView| 28 // |imageUID| is a unique number in the context of the |IKImageBrowserView|
28 // instance. 29 // instance.
29 // |imageTitle| is the source's name to be used as the label in 30 // |imageTitle| is the source's name to be used as the label in
30 // |IKImageBrowserView|. 31 // |IKImageBrowserView|.
31 - (id)initWithSourceId:(content::DesktopMediaID)sourceID 32 - (id)initWithSourceId:(content::DesktopMediaID)sourceID
32 imageUID:(int)imageUID 33 imageUID:(int)imageUID
33 imageTitle:(NSString*)imageTitle; 34 imageTitle:(NSString*)imageTitle;
34 35
35 // Returns the source's ID. 36 // Returns the source's ID.
36 - (content::DesktopMediaID)sourceID; 37 - (content::DesktopMediaID)sourceID;
37 38
38 // Sets the image of the item to be displayed in |IKImageBrowserView|. 39 // Sets the image of the item to be displayed in |IKImageBrowserView|.
39 - (void)setImageRepresentation:(NSImage*)image; 40 - (void)setImageRepresentation:(NSImage*)image;
40 41
41 // Sets the label of the item to be displayed in |IKImageBrowserView|. 42 // Sets the label of the item to be displayed in |IKImageBrowserView|.
42 - (void)setImageTitle:(NSString*)imageTitle; 43 - (void)setImageTitle:(NSString*)imageTitle;
43 44
45 // Sets true, if we do not want to show the title.
46 - (void)setTitleHidden:(bool)hidden;
tapted 2016/07/22 03:43:36 for simply types we usually just use properties. I
qiangchen 2016/07/22 18:33:54 Done.
47
44 @end 48 @end
45 49
46 #endif // CHROME_BROWSER_UI_COCOA_MEDIA_PICKER_DESKTOP_MEDIA_PICKER_ITEM_H_ 50 #endif // CHROME_BROWSER_UI_COCOA_MEDIA_PICKER_DESKTOP_MEDIA_PICKER_ITEM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698