summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-04 20:17:39 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-04 20:17:39 +0000
commitcbe89c9bfb51c1bf577584d32df5d8b7a3c83159 (patch)
tree354e107d246dab86da1aca3f79ef11a9b318ea9e /webkit
parent59c4dd56e427e29eb26e81512c3066fe3f8b13b8 (diff)
downloadchromium_src-cbe89c9bfb51c1bf577584d32df5d8b7a3c83159.zip
chromium_src-cbe89c9bfb51c1bf577584d32df5d8b7a3c83159.tar.gz
chromium_src-cbe89c9bfb51c1bf577584d32df5d8b7a3c83159.tar.bz2
Get rid of the extension dependency in ResourceDispatcher by calling out to a webkit_glue function that can update the peer. No point sending the boolean flag from the browser since the same check is done in the renderer.
Review URL: http://codereview.chromium.org/6628006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76957 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/webkit_glue.h8
-rw-r--r--webkit/plugins/npapi/webplugin_delegate_impl_gtk.cc1
-rw-r--r--webkit/support/webkit_support_glue.cc7
-rw-r--r--webkit/tools/test_shell/test_shell.cc7
-rw-r--r--webkit/tools/test_shell/test_webview_delegate_gtk.cc1
5 files changed, 22 insertions, 2 deletions
diff --git a/webkit/glue/webkit_glue.h b/webkit/glue/webkit_glue.h
index d2cdd5f..8e318c3 100644
--- a/webkit/glue/webkit_glue.h
+++ b/webkit/glue/webkit_glue.h
@@ -20,6 +20,7 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCanvas.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileError.h"
#include "ui/base/clipboard/clipboard.h"
+#include "webkit/glue/resource_loader_bridge.h"
class GURL;
class SkBitmap;
@@ -281,6 +282,13 @@ void EnableSpdy(bool enable);
// Notifies the browser that the given action has been performed.
void UserMetricsRecordAction(const std::string& action);
+// Allows the embedder to swap the peer for a request through the resource
+// loader. Return NULL to keep the existing peer.
+webkit_glue::ResourceLoaderBridge::Peer* ReplacePeer(
+ webkit_glue::ResourceLoaderBridge::Peer* current_peer,
+ const std::string& mime_type,
+ const GURL& url);
+
#if !defined(DISABLE_NACL)
// Launch NaCl's sel_ldr process.
bool LaunchSelLdr(const char* alleged_url, int socket_count, void* imc_handles,
diff --git a/webkit/plugins/npapi/webplugin_delegate_impl_gtk.cc b/webkit/plugins/npapi/webplugin_delegate_impl_gtk.cc
index 8e6d766..726abc0 100644
--- a/webkit/plugins/npapi/webplugin_delegate_impl_gtk.cc
+++ b/webkit/plugins/npapi/webplugin_delegate_impl_gtk.cc
@@ -20,7 +20,6 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
#include "ui/gfx/blit.h"
-#include "webkit/glue/webkit_glue.h"
#include "webkit/plugins/npapi/gtk_plugin_container.h"
#include "webkit/plugins/npapi/plugin_constants_win.h"
#include "webkit/plugins/npapi/plugin_instance.h"
diff --git a/webkit/support/webkit_support_glue.cc b/webkit/support/webkit_support_glue.cc
index 562b989..40e46f1 100644
--- a/webkit/support/webkit_support_glue.cc
+++ b/webkit/support/webkit_support_glue.cc
@@ -99,6 +99,13 @@ void EnableSpdy(bool enable) {
void UserMetricsRecordAction(const std::string& action) {
}
+webkit_glue::ResourceLoaderBridge::Peer* ReplacePeer(
+ webkit_glue::ResourceLoaderBridge::Peer* current_peer,
+ const std::string& mime_type,
+ const GURL& url) {
+ return NULL;
+}
+
#if defined(OS_LINUX)
int MatchFontWithFallback(const std::string& face, bool bold,
bool italic, int charset) {
diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc
index f106c35..31f9e68 100644
--- a/webkit/tools/test_shell/test_shell.cc
+++ b/webkit/tools/test_shell/test_shell.cc
@@ -690,6 +690,13 @@ void EnableSpdy(bool enable) {
void UserMetricsRecordAction(const std::string& action) {
}
+webkit_glue::ResourceLoaderBridge::Peer* ReplacePeer(
+ webkit_glue::ResourceLoaderBridge::Peer* current_peer,
+ const std::string& mime_type,
+ const GURL& url) {
+ return NULL;
+}
+
std::string GetProductVersion() {
return std::string("Chrome/0.0.0.0");
}
diff --git a/webkit/tools/test_shell/test_webview_delegate_gtk.cc b/webkit/tools/test_shell/test_webview_delegate_gtk.cc
index 38e64cb..42372f3 100644
--- a/webkit/tools/test_shell/test_webview_delegate_gtk.cc
+++ b/webkit/tools/test_shell/test_webview_delegate_gtk.cc
@@ -24,7 +24,6 @@
#include "webkit/glue/webcursor.h"
#include "webkit/glue/webdropdata.h"
#include "webkit/glue/webpreferences.h"
-#include "webkit/glue/webkit_glue.h"
#include "webkit/glue/window_open_disposition.h"
#include "webkit/plugins/npapi/gtk_plugin_container_manager.h"
#include "webkit/plugins/npapi/plugin_list.h"