31 #include <nsStringGlue.h>
33 #include <nsIDOMDocumentEvent.h>
34 #include <nsIDOMEventTarget.h>
44 static PRLogModuleInfo* gGStreamerPlatformBase =
45 PR_NewLogModule(
"sbGStreamerPlatformBase");
48 if (gGStreamerPlatformBase) \
49 PR_LOG(gGStreamerPlatformBase, PR_LOG_WARNING, args)
52 if (gGStreamerPlatformBase) \
53 PR_LOG(gGStreamerPlatformBase, PR_LOG_DEBUG, args)
115 LOG((
"Resizing video to fit window in non-fullscreen mode"));
128 LOG((
"Not resizing video: no video box"));
132 LOG((
"Not resizing video: in fullscreen mode"));
139 LOG((
"Display area set to %d,%d %d,%d", x, y, width, height));
191 GstXOverlay *xoverlay = NULL;
195 element = gst_bin_get_by_interface(GST_BIN (
mVideoSink),
202 if (GST_IS_X_OVERLAY (element)) {
203 xoverlay = GST_X_OVERLAY (element);
204 LOG((
"xoverlay interface found, setting video window"));
207 LOG((
"No xoverlay interface found, cannot set video window"));
228 NS_ENSURE_ARG_POINTER(aDocument);
236 NS_ENSURE_ARG_POINTER(aMouseEvent);
238 nsresult rv = NS_ERROR_UNEXPECTED;
239 nsCOMPtr<nsIDOMDocumentEvent> docEvent = do_QueryInterface(
mDocument, &rv);
240 NS_ENSURE_SUCCESS(rv, rv);
242 nsCOMPtr<nsIDOMEvent>
event;
243 rv = docEvent->CreateEvent(NS_LITERAL_STRING(
"mouseevent"),
244 getter_AddRefs(event));
245 NS_ENSURE_SUCCESS(rv, rv);
247 nsCOMPtr<nsIDOMMouseEvent> mouseEvent = do_QueryInterface(event, &rv);
248 NS_ENSURE_SUCCESS(rv, rv);
250 mouseEvent.forget(aMouseEvent);
258 NS_ENSURE_ARG_POINTER(aKeyEvent);
260 nsresult rv = NS_ERROR_UNEXPECTED;
261 nsCOMPtr<nsIDOMDocumentEvent> docEvent = do_QueryInterface(
mDocument, &rv);
262 NS_ENSURE_SUCCESS(rv, rv);
264 nsCOMPtr<nsIDOMEvent>
event;
265 rv = docEvent->CreateEvent(NS_LITERAL_STRING(
"keyevents"),
266 getter_AddRefs(event));
267 NS_ENSURE_SUCCESS(rv, rv);
269 nsCOMPtr<nsIDOMKeyEvent> keyEvent = do_QueryInterface(event, &rv);
270 NS_ENSURE_SUCCESS(rv, rv);
272 keyEvent.forget(aKeyEvent);
280 NS_ENSURE_ARG_POINTER(aEvent);
282 nsresult rv = NS_ERROR_UNEXPECTED;
284 NS_ENSURE_SUCCESS( rv, rv );
286 PRBool dummy = PR_FALSE;
287 rv = eventTarget->DispatchEvent(aEvent, &dummy);
288 NS_ENSURE_SUCCESS(rv, rv);
_collectFormDataForFrame aDocument