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

Unified Diff: webkit/glue/context_menu_client_impl.cc

Issue 174119: Disable playback controls if audio/video element has errored. (Closed)
Patch Set: Created 11 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/context_menu_client_impl.cc
diff --git a/webkit/glue/context_menu_client_impl.cc b/webkit/glue/context_menu_client_impl.cc
index 5ad232d403eafe5c9277e9eed571e68f9f43975e..b32b572cf68cccdf6abdf7e37a83fc6626417856 100644
--- a/webkit/glue/context_menu_client_impl.cc
+++ b/webkit/glue/context_menu_client_impl.cc
@@ -18,6 +18,7 @@ MSVC_PUSH_WARNING_LEVEL(0);
#include "HTMLMediaElement.h"
#include "HTMLNames.h"
#include "KURL.h"
+#include "MediaError.h"
awong 2009/08/20 18:33:54 Do you need to include MediaError?
scherkus (not reviewing) 2009/08/20 18:50:24 HTMLMediaElement::error() returns PassRefPtr<Media
awong 2009/08/20 18:57:52 Ah...makes sense. <insert grumbling about making
#include "Widget.h"
MSVC_POP_WARNING();
#undef LOG
@@ -191,6 +192,9 @@ WebCore::PlatformMenuDescription
node_type.type |= ContextNodeType::AUDIO;
}
+ if (media_element->error()) {
+ media_params.player_state |= ContextMenuMediaParams::IN_ERROR;
+ }
if (media_element->paused()) {
media_params.player_state |= ContextMenuMediaParams::PAUSED;
}
@@ -203,7 +207,6 @@ WebCore::PlatformMenuDescription
if (media_element->supportsSave()) {
media_params.player_state |= ContextMenuMediaParams::CAN_SAVE;
}
- // TODO(ajwong): Report error states in the media player.
}
// If it's not a link, an image, a media element, or an image/media link,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698