33 #include <sbIPlaylistClickEvent.h>
35 #include <nsComponentManagerUtils.h>
36 #include <nsIProgrammingLanguage.h>
45 static PRLogModuleInfo* gRemoteEventLog = nsnull;
49 #define LOG(args) PR_LOG(gRemoteEventLog, PR_LOG_WARN, args)
70 "classinfo:classDescription",
71 "classinfo:contractID",
73 "classinfo:implementationLanguage",
107 sbRemotePlaylistClickEvent::sbRemotePlaylistClickEvent(
sbRemotePlayer* aRemotePlayer ) :
108 mRemotePlayer(aRemotePlayer)
110 NS_ASSERTION(aRemotePlayer,
"aRemotePlayer is null");
111 MOZ_COUNT_CTOR(sbRemotePlaylistClickEvent);
113 if (!gRemoteEventLog) {
114 gRemoteEventLog = PR_NewLogModule(
"sbRemotePlaylistClickEvent");
116 LOG((
"sbRemotePlaylistClickEvent::sbRemotePlaylistClickEvent()"));
132 sbRemotePlaylistClickEvent::GetRemotePlayer(
sbIRemotePlayer * *aRemotePlayer)
135 NS_ENSURE_ARG_POINTER(aRemotePlayer);
138 *aRemotePlayer = nsnull;
143 NS_ENSURE_SUCCESS( rv, rv );
145 remotePlayer.swap( *aRemotePlayer );
159 NS_ENSURE_ARG( aClickEvent );
160 NS_ENSURE_ARG( aMouseEvent );
163 nsCOMPtr<sbIMediaItem>
item;
164 rv = aClickEvent->GetItem( getter_AddRefs(item) );
165 NS_ENSURE_SUCCESS(rv, rv);
168 NS_ENSURE_SUCCESS(rv, rv);
170 rv = aClickEvent->GetProperty(
mProperty );
171 NS_ENSURE_SUCCESS(rv, rv);
175 NS_ENSURE_SUCCESS(rv, rv);
192 NS_IMETHODIMP sbRemotePlaylistClickEvent::GetItem(
sbIMediaItem * *aItem)
194 NS_ENSURE_ARG(aItem);
201 return (*aItem ?
NS_OK : NS_ERROR_FAILURE);
206 #define FORWARD_NSIPRIVATEDOMEVENT(_method, _type, _arg, _rettype, _default) \
207 NS_IMETHODIMP_(_rettype) sbRemotePlaylistClickEvent::_method( _type _arg ) \
210 nsCOMPtr<nsIPrivateDOMEvent> inner( do_QueryInterface(mMouseEvent, &rv) ); \
211 NS_ENSURE_SUCCESS(rv, _default); \
212 return inner->_method( _arg ); \
nsCOMPtr< sbIMediaItem > mWrappedItem
NS_IMPL_ISUPPORTS9(sbRemotePlaylistClickEvent, nsIClassInfo, nsIDOMEvent, nsIDOMMouseEvent, nsIDOMNSEvent, nsIDOMUIEvent, nsIPrivateDOMEvent, nsISecurityCheckedComponent, sbIPlaylistClickEvent, sbISecurityAggregator) NS_IMPL_CI_INTERFACE_GETTER7(sbRemotePlaylistClickEvent
static const char * sPublicWProperties[]
#define SB_IMPL_SECURITYCHECKEDCOMP_INIT(_class)
static const char * sPublicRProperties[]
readonly attribute sbIRemotePlayer remotePlayer
This interface is a composition of many of our other interfaces with the goal of exposing a more web-...
an interface to maintain information about the last event that occurred
#define FORWARD_NSIPRIVATEDOMEVENT(_method, _type, _arg, _rettype, _default)
A marker interface for objects that aggregate the security mixin.
readonly attribute sbIMediaItem item
nsISecurityCheckedComponent
NS_IMETHOD InitEvent(sbIPlaylistClickEvent *, nsIDOMMouseEvent *)
static nsresult GetProperty(nsIPropertyBag2 *aProperties, nsAString const &aProp, nsAString &aValue)
nsCOMPtr< nsIDOMMouseEvent > mMouseEvent
nsRefPtr< sbRemotePlayer > mRemotePlayer
nsCOMPtr< nsIDOMNSEvent > mNSEvent
static nsresult SB_WrapMediaItem(sbRemotePlayer *aRemotePlayer, sbIMediaItem *aMediaItem, sbIMediaItem **aRemoteMediaItem)
static const char * sPublicMethods[]
#define SB_IMPL_CLASSINFO_INTERFACES_ONLY(_class)
~sbRemotePlaylistClickEvent()