summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/renderer_glue.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-16 19:58:08 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-16 19:58:08 +0000
commit5b35a6be09ab4a22ed9c5e0a073463a2ef630ec5 (patch)
tree00bdf30d37b70e4f3b027c7a5dc49784e08be98b /chrome/renderer/renderer_glue.cc
parent65e9cdbe8cf977e04bc264fe6d70cc5b2b0242a1 (diff)
downloadchromium_src-5b35a6be09ab4a22ed9c5e0a073463a2ef630ec5.zip
chromium_src-5b35a6be09ab4a22ed9c5e0a073463a2ef630ec5.tar.gz
chromium_src-5b35a6be09ab4a22ed9c5e0a073463a2ef630ec5.tar.bz2
Get rid of stashing a frame pointer with ResourceRequest and just store the routing id directly. This simplifies the renderer code and also allow this code to be used in worker processes, where we don't have a frame.
Review URL: http://codereview.chromium.org/46026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11763 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/renderer_glue.cc')
-rw-r--r--chrome/renderer/renderer_glue.cc21
1 files changed, 3 insertions, 18 deletions
diff --git a/chrome/renderer/renderer_glue.cc b/chrome/renderer/renderer_glue.cc
index 997748a..f741ffd 100644
--- a/chrome/renderer/renderer_glue.cc
+++ b/chrome/renderer/renderer_glue.cc
@@ -21,7 +21,6 @@
#include "chrome/renderer/net/render_dns_master.h"
#include "chrome/renderer/render_process.h"
#include "chrome/renderer/render_thread.h"
-#include "chrome/renderer/render_view.h"
#include "googleurl/src/url_util.h"
#include "webkit/glue/scoped_clipboard_writer_glue.h"
#include "webkit/glue/webframe.h"
@@ -230,7 +229,6 @@ webkit_glue::ScreenInfo GetScreenInfo(gfx::NativeViewId window) {
// static factory function
ResourceLoaderBridge* ResourceLoaderBridge::Create(
- WebFrame* webframe,
const std::string& method,
const GURL& url,
const GURL& policy_url,
@@ -239,25 +237,12 @@ ResourceLoaderBridge* ResourceLoaderBridge::Create(
int load_flags,
int origin_pid,
ResourceType::Type resource_type,
- bool mixed_content) {
- // TODO(darin): we need to eliminate the webframe parameter because webkit
- // does not always supply it (see ResourceHandle::loadResourceSynchronously).
- // Instead we should add context to ResourceRequest, which will be easy to do
- // once we merge to the latest WebKit (r23806 at least).
- if (!webframe) {
- NOTREACHED() << "no webframe";
- return NULL;
- }
-
- if (!webframe->GetView()->GetDelegate())
- return NULL;
-
- RenderView* rv = static_cast<RenderView*>(webframe->GetView()->GetDelegate());
- int route_id = rv->routing_id();
+ bool mixed_content,
+ int routing_id) {
ResourceDispatcher* dispatch = RenderThread::current()->resource_dispatcher();
return dispatch->CreateBridge(method, url, policy_url, referrer, headers,
load_flags, origin_pid, resource_type,
- mixed_content, 0, route_id);
+ mixed_content, 0, routing_id);
}
void NotifyCacheStats() {