summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorjeremya@chromium.org <jeremya@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-27 01:32:08 +0000
committerjeremya@chromium.org <jeremya@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-27 01:32:08 +0000
commiteb4bcacd683a68534bbe2e4d8d6eeafafc7f57ba (patch)
tree4c259bae6313587039a9b3eb017fdca11082a929 /content
parentdd11556bce64ab450ab6e92b8b6396b3f177860f (diff)
downloadchromium_src-eb4bcacd683a68534bbe2e4d8d6eeafafc7f57ba.zip
chromium_src-eb4bcacd683a68534bbe2e4d8d6eeafafc7f57ba.tar.gz
chromium_src-eb4bcacd683a68534bbe2e4d8d6eeafafc7f57ba.tar.bz2
Make chrome.appWindow.create() provide access to the child window at a predictable time.
When you first create a window with chrome.appWindow.create(), it won't have loaded any resources. So, at create time, you are guaranteed that: child_window.location.href == 'about:blank' child_window.document.documentElement.outerHTML == '<html><head></head><body></body></html>' This is in line with the behaviour of window.open(). BUG=131735 TEST=browser_tests:PlatformAppBrowserTest.WindowsApi Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=144072 Review URL: https://chromiumcodereview.appspot.com/10644006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144356 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/renderer_host/resource_dispatcher_host_impl.cc1
-rw-r--r--content/browser/renderer_host/resource_dispatcher_host_impl.h12
-rw-r--r--content/public/browser/resource_dispatcher_host.h8
3 files changed, 12 insertions, 9 deletions
diff --git a/content/browser/renderer_host/resource_dispatcher_host_impl.cc b/content/browser/renderer_host/resource_dispatcher_host_impl.cc
index 9514845..692f7f3 100644
--- a/content/browser/renderer_host/resource_dispatcher_host_impl.cc
+++ b/content/browser/renderer_host/resource_dispatcher_host_impl.cc
@@ -1631,6 +1631,7 @@ void ResourceDispatcherHostImpl::UpdateLoadStates() {
void ResourceDispatcherHostImpl::BlockRequestsForRoute(int child_id,
int route_id) {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
ProcessRouteIDs key(child_id, route_id);
DCHECK(blocked_loaders_map_.find(key) == blocked_loaders_map_.end()) <<
"BlockRequestsForRoute called multiple time for the same RVH";
diff --git a/content/browser/renderer_host/resource_dispatcher_host_impl.h b/content/browser/renderer_host/resource_dispatcher_host_impl.h
index d8fece0..4e1b6aa 100644
--- a/content/browser/renderer_host/resource_dispatcher_host_impl.h
+++ b/content/browser/renderer_host/resource_dispatcher_host_impl.h
@@ -86,6 +86,9 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl
const DownloadSaveInfo& save_info,
const DownloadStartedCallback& started_callback) OVERRIDE;
virtual void ClearLoginDelegateForRequest(net::URLRequest* request) OVERRIDE;
+ virtual void BlockRequestsForRoute(int child_id, int route_id) OVERRIDE;
+ virtual void ResumeBlockedRequestsForRoute(
+ int child_id, int route_id) OVERRIDE;
// Puts the resource dispatcher host in an inactive state (unable to begin
// new requests). Cancels all pending requests.
@@ -176,15 +179,6 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl
void RemovePendingRequest(int child_id, int request_id);
- // Causes all new requests for the route identified by
- // |child_id| and |route_id| to be blocked (not being
- // started) until ResumeBlockedRequestsForRoute or
- // CancelBlockedRequestsForRoute is called.
- void BlockRequestsForRoute(int child_id, int route_id);
-
- // Resumes any blocked request for the specified route id.
- void ResumeBlockedRequestsForRoute(int child_id, int route_id);
-
// Cancels any blocked request for the specified route id.
void CancelBlockedRequestsForRoute(int child_id, int route_id);
diff --git a/content/public/browser/resource_dispatcher_host.h b/content/public/browser/resource_dispatcher_host.h
index d6f813b..d289366 100644
--- a/content/public/browser/resource_dispatcher_host.h
+++ b/content/public/browser/resource_dispatcher_host.h
@@ -53,6 +53,14 @@ class CONTENT_EXPORT ResourceDispatcherHost {
// Clears the ResourceDispatcherHostLoginDelegate associated with the request.
virtual void ClearLoginDelegateForRequest(net::URLRequest* request) = 0;
+ // Causes all new requests for the route identified by |child_id| and
+ // |route_id| to be blocked (not being started) until
+ // ResumeBlockedRequestsForRoute is called.
+ virtual void BlockRequestsForRoute(int child_id, int route_id) = 0;
+
+ // Resumes any blocked request for the specified route id.
+ virtual void ResumeBlockedRequestsForRoute(int child_id, int route_id) = 0;
+
protected:
virtual ~ResourceDispatcherHost() {}
};