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

Unified Diff: chrome/browser/ui/cocoa/media_picker/desktop_media_picker_item.h

Issue 23944003: Implement Desktop Media Picker (Mac version) for Desktop Capture API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed comments. Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/media_picker/desktop_media_picker_item.h
diff --git a/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_item.h b/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_item.h
new file mode 100644
index 0000000000000000000000000000000000000000..37d627e8177399e01b235cac5bd576cca8f024f5
--- /dev/null
+++ b/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_item.h
@@ -0,0 +1,46 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_COCOA_MEDIA_PICKER_DESKTOP_MEDIA_PICKER_ITEM_H_
+#define CHROME_BROWSER_UI_COCOA_MEDIA_PICKER_DESKTOP_MEDIA_PICKER_ITEM_H_
+
+#import <AppKit/AppKit.h>
+
+#include "base/mac/scoped_nsobject.h"
Robert Sesek 2013/09/04 20:23:19 #import
dcaiafa 2013/09/04 21:39:35 Done.
+#include "chrome/browser/media/desktop_media_picker_model.h"
+
+// Stores the data representing a |DesktopMediaPicker| source for displaying in
+// a |IKImageBrowserView|. Implements the |IKImageBrowserItem| informal
+// protocol.
+@interface DesktopMediaPickerItem : NSObject {
+ @private
+ content::DesktopMediaID sourceId_;
Robert Sesek 2013/09/04 20:23:19 I'd call this sourceID_ since it's DesktopMediaID
dcaiafa 2013/09/04 21:39:35 Done.
+ base::scoped_nsobject<NSString> imageUID_;
+ base::scoped_nsobject<NSString> imageTitle_;
+ base::scoped_nsobject<NSImage> image_;
+ NSUInteger imageVersion_;
+}
+
+// Designated initializer.
+// |sourceId| is the corresponding source's ID as provided by the model.
+// |imageUID| is a unique number in the context of the |IKImageBrowserView|
+// instance.
+// |imageTitle| is the source's name to be used as the label in
+// |IKImageBrowserView|.
+- (id)initWithSourceId:(content::DesktopMediaID)sourceId
+ imageUID:(int)imageUID
+ imageTitle:(NSString*)imageTitle;
+
+// Returns the source's ID.
+- (content::DesktopMediaID)sourceId;
Robert Sesek 2013/09/04 20:23:19 same: sourceID
dcaiafa 2013/09/04 21:39:35 Done.
+
+// Sets the image of the item to be displayed in |IKImageBrowserView|.
+- (void)setImageRepresentation:(NSImage*)image;
+
+// Sets the label of the item to be displayed in |IKImageBrowserView|.
+- (void)setImageTitle:(NSString*)imageTitle;
+
+@end
+
+#endif // CHROME_BROWSER_UI_COCOA_MEDIA_PICKER_DESKTOP_MEDIA_PICKER_ITEM_H_

Powered by Google App Engine
This is Rietveld 408576698