diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-24 01:29:20 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-24 01:29:20 +0000 |
commit | 5778de6e6bfbc0439f49a245a75efa44e4f9a771 (patch) | |
tree | 7596aff0328ee022a23a9a0e84c28f94ee40ea30 /chrome_frame/chrome_frame_automation.h | |
parent | b5be3f53d7af0037dbc634beb550752de56ad840 (diff) | |
download | chromium_src-5778de6e6bfbc0439f49a245a75efa44e4f9a771.zip chromium_src-5778de6e6bfbc0439f49a245a75efa44e4f9a771.tar.gz chromium_src-5778de6e6bfbc0439f49a245a75efa44e4f9a771.tar.bz2 |
Currently the host network stack in IE which uses Urlmon interfaces to initiate
and complete URL downloads requested by ChromeFrame, executes in the UI thread of IE.
While this works fine in most cases for large data sizes, the IE UI thread ends up being
busy pulling the data in our IBindStatusCallback::OnDataAvailable implementation. As a result
the browser hangs until all data is pulled out.
The fix is to handle Urlmon requests on a separate thread.
This fixes http://code.google.com/p/chromium/issues/detail?id=24007
Changes to plugin_url_request.cc/.h are to set the LF property on these files.
Bug=24007
Review URL: http://codereview.chromium.org/292035
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29986 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_frame_automation.h')
-rw-r--r-- | chrome_frame/chrome_frame_automation.h | 36 |
1 files changed, 7 insertions, 29 deletions
diff --git a/chrome_frame/chrome_frame_automation.h b/chrome_frame/chrome_frame_automation.h index 6eca88d..f2120e2 100644 --- a/chrome_frame/chrome_frame_automation.h +++ b/chrome_frame/chrome_frame_automation.h @@ -144,35 +144,6 @@ class ProxyFactory { int uma_send_interval_; }; -// T is expected to be something CWindowImpl derived, or at least to have -// PostMessage(UINT, WPARAM) method. Do not forget to CHAIN_MSG_MAP -template <class T> class TaskMarshallerThroughWindowsMessages { - public: - void PostTask(const tracked_objects::Location& from_here, Task* task) { - task->SetBirthPlace(from_here); - T* this_ptr = static_cast<T*>(this); - if (this_ptr->IsWindow()) { - this_ptr->PostMessage(MSG_EXECUTE_TASK, reinterpret_cast<WPARAM>(task)); - } else { - DLOG(INFO) << "Dropping MSG_EXECUTE_TASK message for destroyed window."; - } - } - - BEGIN_MSG_MAP(PostMessageMarshaller) - MESSAGE_HANDLER(MSG_EXECUTE_TASK, ExecuteTask) - END_MSG_MAP() - - private: - enum { MSG_EXECUTE_TASK = WM_APP + 6 }; - inline LRESULT ExecuteTask(UINT, WPARAM wparam, LPARAM, - BOOL& handled) { // NOLINT - Task* task = reinterpret_cast<Task*>(wparam); - task->Run(); - delete task; - return 0; - } -}; - // Handles all automation requests initiated from the chrome frame objects. // These include the chrome tab/chrome frame activex/chrome frame npapi // plugin objects. @@ -296,6 +267,13 @@ class ChromeFrameAutomationClient void SetPageFontSize(enum AutomationPageFontSize); + // Dummy reference counting functions to enable us to use the + // TaskMarshallerThroughWindowsMessages functionality. At this point we don't + // need to ensure that any tasks executed on us grab a reference to ensure + // that the instance remains valid. + void AddRef() {} + void Release() {} + protected: // ChromeFrameAutomationProxy::LaunchDelegate implementation. virtual void LaunchComplete(ChromeFrameAutomationProxy* proxy, |