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

Unified Diff: webkit/glue/webplugin_impl.cc

Issue 118452: For lack of a better approach we now initiate the plugin src url download in ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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 | « webkit/glue/webplugin_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webplugin_impl.cc
===================================================================
--- webkit/glue/webplugin_impl.cc (revision 17977)
+++ webkit/glue/webplugin_impl.cc (working copy)
@@ -378,7 +378,8 @@
plugin_url_(plugin_url),
load_manually_(load_manually),
first_geometry_update_(true),
- mime_type_(mime_type) {
+ mime_type_(mime_type),
+ ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)) {
ArrayToVector(arg_count, arg_names, &arg_names_);
ArrayToVector(arg_count, arg_values, &arg_values_);
@@ -733,13 +734,25 @@
first_geometry_update_ = false;
// An empty url corresponds to an EMBED tag with no src attribute.
if (!load_manually_ && plugin_url_.is_valid()) {
- HandleURLRequestInternal("GET", false, NULL, 0, NULL, false, false,
- plugin_url_.spec().c_str(), NULL, false,
- false);
+ // The Flash plugin hangs for a while if it receives data before
+ // receiving valid plugin geometry. By valid geometry we mean the
+ // geometry received by a call to setFrameRect in the Webkit
+ // layout code path. To workaround this issue we download the
+ // plugin source url on a timer.
+ MessageLoop::current()->PostDelayedTask(FROM_HERE,
+ method_factory_.NewRunnableMethod(
+ &WebPluginImpl::OnDownloadPluginSrcUrl),
+ 0);
}
}
}
+void WebPluginImpl::OnDownloadPluginSrcUrl() {
+ HandleURLRequestInternal("GET", false, NULL, 0, NULL, false, false,
+ plugin_url_.spec().c_str(), NULL, false,
+ false);
+}
+
void WebPluginImpl::paint(WebCore::GraphicsContext* gc,
const WebCore::IntRect& damage_rect) {
if (gc->paintingDisabled())
« no previous file with comments | « webkit/glue/webplugin_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698