summaryrefslogtreecommitdiffstats
path: root/chrome_frame
diff options
context:
space:
mode:
authorstoyan@chromium.org <stoyan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-04 00:26:11 +0000
committerstoyan@chromium.org <stoyan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-04 00:26:11 +0000
commit56f33994c2a8de4f240c77b324426f652a5497d7 (patch)
tree6b6b8c8ace99c9dfdd2261536e52bd711fd5d381 /chrome_frame
parentd13c32787737f1822202802f062c41c38b90e5f5 (diff)
downloadchromium_src-56f33994c2a8de4f240c77b324426f652a5497d7.zip
chromium_src-56f33994c2a8de4f240c77b324426f652a5497d7.tar.gz
chromium_src-56f33994c2a8de4f240c77b324426f652a5497d7.tar.bz2
Provide parent window for Urlmon error dialogs.
Review URL: http://codereview.chromium.org/567036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38053 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r--chrome_frame/chrome_frame_activex_base.h1
-rw-r--r--chrome_frame/urlmon_url_request.cc8
-rw-r--r--chrome_frame/urlmon_url_request.h3
3 files changed, 9 insertions, 3 deletions
diff --git a/chrome_frame/chrome_frame_activex_base.h b/chrome_frame/chrome_frame_activex_base.h
index fe11b66..8494f83 100644
--- a/chrome_frame/chrome_frame_activex_base.h
+++ b/chrome_frame/chrome_frame_activex_base.h
@@ -516,6 +516,7 @@ END_MSG_MAP()
LRESULT OnCreate(UINT message, WPARAM wparam, LPARAM lparam,
BOOL& handled) { // NO_LINT
ModifyStyle(0, WS_CLIPCHILDREN | WS_CLIPSIBLINGS, 0);
+ url_fetcher_.SetErrorDialogsParentWindow(m_hWnd);
automation_client_->SetParentWindow(m_hWnd);
// Only fire the 'interactive' ready state if we aren't there already.
if (ready_state_ < READYSTATE_INTERACTIVE) {
diff --git a/chrome_frame/urlmon_url_request.cc b/chrome_frame/urlmon_url_request.cc
index 9cb8895..b08be33 100644
--- a/chrome_frame/urlmon_url_request.cc
+++ b/chrome_frame/urlmon_url_request.cc
@@ -879,6 +879,7 @@ void UrlmonUrlRequestManager::StartRequestWorker(int request_id,
request_info.extra_request_headers,
request_info.upload_data,
enable_frame_busting_);
+ new_request->set_parent_window(err_dialog_parent_wnd_);
// Shall we use an existing moniker?
if (moniker_for_url.get()) {
@@ -890,7 +891,6 @@ void UrlmonUrlRequestManager::StartRequestWorker(int request_id,
DCHECK(LookupRequest(request_id).get() == NULL);
request_map_[request_id] = new_request;
map_empty_.Reset();
-
new_request->Start();
}
@@ -1016,7 +1016,7 @@ scoped_refptr<UrlmonUrlRequest> UrlmonUrlRequestManager::LookupRequest(
UrlmonUrlRequestManager::UrlmonUrlRequestManager()
: stopping_(false), worker_thread_("UrlMon fetch thread"),
- map_empty_(true, true) {
+ map_empty_(true, true), err_dialog_parent_wnd_(NULL) {
}
UrlmonUrlRequestManager::~UrlmonUrlRequestManager() {
@@ -1062,3 +1062,7 @@ bool UrlmonUrlRequestManager::ExecuteInWorkerThread(
worker_thread_.message_loop()->PostTask(from_here, task);
return true;
}
+
+void UrlmonUrlRequestManager::SetErrorDialogsParentWindow(HWND window) {
+ err_dialog_parent_wnd_ = window;
+} \ No newline at end of file
diff --git a/chrome_frame/urlmon_url_request.h b/chrome_frame/urlmon_url_request.h
index 894a431..ebb9f56 100644
--- a/chrome_frame/urlmon_url_request.h
+++ b/chrome_frame/urlmon_url_request.h
@@ -31,7 +31,7 @@ class UrlmonUrlRequestManager :
void UseMonikerForUrl(IMoniker* moniker, IBindCtx* bind_ctx,
const std::wstring& url);
void StealMonikerFromRequest(int request_id, IMoniker** moniker);
-
+ void SetErrorDialogsParentWindow(HWND window);
private:
struct MonikerForUrl {
MonikerForUrl() {
@@ -86,6 +86,7 @@ class UrlmonUrlRequestManager :
base::WaitableEvent map_empty_;
bool stopping_;
Lock worker_thread_access_;
+ HWND err_dialog_parent_wnd_;
};
#endif // CHROME_FRAME_URLMON_URL_REQUEST_H_