summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-14 08:25:49 +0000
committerjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-14 08:25:49 +0000
commitf8c700bae560d44b15abd73926e3d589433f1d27 (patch)
tree03073d4543a484db7752dad6c3011fc56a5646af
parentddfbd8f071364bdcfb40fc517a7fa1e82893a5e8 (diff)
downloadchromium_src-f8c700bae560d44b15abd73926e3d589433f1d27.zip
chromium_src-f8c700bae560d44b15abd73926e3d589433f1d27.tar.gz
chromium_src-f8c700bae560d44b15abd73926e3d589433f1d27.tar.bz2
Move resource fetchers to renderer-specific location
ResourceFetcher is a helper class for using the WebKit API to grab simple resources, like favicons. This code is only used in content/renderer/ and so doesn't need to be in glue. BUG=237267 Review URL: https://chromiumcodereview.appspot.com/14649022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@199948 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/renderer/chrome_render_view_observer.cc2
-rw-r--r--chrome/renderer/extensions/extension_helper.cc11
-rw-r--r--chrome/renderer/extensions/extension_helper.h13
-rw-r--r--content/content_renderer.gypi8
-rw-r--r--content/renderer/fetchers/alt_error_page_resource_fetcher.cc (renamed from webkit/glue/alt_error_page_resource_fetcher.cc)8
-rw-r--r--content/renderer/fetchers/alt_error_page_resource_fetcher.h (renamed from webkit/glue/alt_error_page_resource_fetcher.h)15
-rw-r--r--content/renderer/fetchers/image_resource_fetcher.cc (renamed from webkit/glue/image_resource_fetcher.cc)10
-rw-r--r--content/renderer/fetchers/image_resource_fetcher.h (renamed from webkit/glue/image_resource_fetcher.h)17
-rw-r--r--content/renderer/fetchers/multi_resolution_image_resource_fetcher.cc (renamed from webkit/glue/multi_resolution_image_resource_fetcher.cc)10
-rw-r--r--content/renderer/fetchers/multi_resolution_image_resource_fetcher.h (renamed from webkit/glue/multi_resolution_image_resource_fetcher.h)17
-rw-r--r--content/renderer/fetchers/resource_fetcher.cc (renamed from webkit/glue/resource_fetcher.cc)6
-rw-r--r--content/renderer/fetchers/resource_fetcher.h (renamed from webkit/glue/resource_fetcher.h)19
-rw-r--r--content/renderer/image_loading_helper.cc3
-rw-r--r--content/renderer/image_loading_helper.h10
-rw-r--r--content/renderer/internal_document_state_data.cc4
-rw-r--r--content/renderer/internal_document_state_data.h11
-rw-r--r--content/renderer/render_view_impl.cc8
-rw-r--r--content/renderer/render_view_impl.h10
-rw-r--r--content/renderer/resource_fetcher_browsertest.cc4
-rw-r--r--webkit/glue/webkit_glue.gypi8
20 files changed, 76 insertions, 118 deletions
diff --git a/chrome/renderer/chrome_render_view_observer.cc b/chrome/renderer/chrome_render_view_observer.cc
index 1e8144c..835bae2 100644
--- a/chrome/renderer/chrome_render_view_observer.cc
+++ b/chrome/renderer/chrome_render_view_observer.cc
@@ -49,7 +49,6 @@
#include "ui/gfx/skbitmap_operations.h"
#include "v8/include/v8-testing.h"
#include "webkit/glue/image_decoder.h"
-#include "webkit/glue/multi_resolution_image_resource_fetcher.h"
#include "webkit/glue/webkit_glue.h"
using WebKit::WebAccessibilityObject;
@@ -69,7 +68,6 @@ using WebKit::WebURLRequest;
using WebKit::WebView;
using WebKit::WebVector;
using extensions::APIPermission;
-using webkit_glue::MultiResolutionImageResourceFetcher;
// Delay in milliseconds that we'll wait before capturing the page contents
// and thumbnail.
diff --git a/chrome/renderer/extensions/extension_helper.cc b/chrome/renderer/extensions/extension_helper.cc
index ae3e9e3..88cfe14 100644
--- a/chrome/renderer/extensions/extension_helper.cc
+++ b/chrome/renderer/extensions/extension_helper.cc
@@ -31,8 +31,6 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebScopedUserGesture.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
-#include "webkit/glue/image_resource_fetcher.h"
-#include "webkit/glue/resource_fetcher.h"
using content::ConsoleMessageLevel;
using WebKit::WebConsoleMessage;
@@ -41,8 +39,6 @@ using WebKit::WebFrame;
using WebKit::WebURLRequest;
using WebKit::WebScopedUserGesture;
using WebKit::WebView;
-using webkit_glue::ImageResourceFetcher;
-using webkit_glue::ResourceFetcher;
namespace extensions {
@@ -235,13 +231,6 @@ void ExtensionHelper::FrameDetached(WebFrame* frame) {
}
void ExtensionHelper::DidCreateDataSource(WebFrame* frame, WebDataSource* ds) {
- // If there are any app-related fetches in progress, they can be cancelled now
- // since we have navigated away from the page that created them.
- if (!frame->parent()) {
- app_icon_fetchers_.clear();
- app_definition_fetcher_.reset(NULL);
- }
-
// Check first if we created a scheduler for the frame, since this function
// gets called for navigations within the document.
if (g_schedulers.Get().count(frame))
diff --git a/chrome/renderer/extensions/extension_helper.h b/chrome/renderer/extensions/extension_helper.h
index 912aad8..c48f184 100644
--- a/chrome/renderer/extensions/extension_helper.h
+++ b/chrome/renderer/extensions/extension_helper.h
@@ -27,11 +27,6 @@ class DictionaryValue;
class ListValue;
}
-namespace webkit_glue {
-class ResourceFetcher;
-class ImageResourceFetcher;
-}
-
namespace extensions {
class Dispatcher;
@@ -105,14 +100,6 @@ class ExtensionHelper
// its manifest and icons are downloaded.
scoped_ptr<WebApplicationInfo> pending_app_info_;
- // Used to download the application definition file.
- scoped_ptr<webkit_glue::ResourceFetcher> app_definition_fetcher_;
-
- // Used to download the icons for an application.
- typedef std::vector<linked_ptr<webkit_glue::ImageResourceFetcher> >
- ImageResourceFetcherList;
- ImageResourceFetcherList app_icon_fetchers_;
-
// The number of app icon requests outstanding. When this reaches zero, we're
// done processing an app definition file.
int pending_app_icon_requests_;
diff --git a/content/content_renderer.gypi b/content/content_renderer.gypi
index 27173a0..351fa2e 100644
--- a/content/content_renderer.gypi
+++ b/content/content_renderer.gypi
@@ -245,6 +245,14 @@
'renderer/browser_plugin/browser_plugin_compositing_helper.cc',
'renderer/date_time_formatter.cc',
'renderer/date_time_formatter.h',
+ 'renderer/fetchers/alt_error_page_resource_fetcher.cc',
+ 'renderer/fetchers/alt_error_page_resource_fetcher.h',
+ 'renderer/fetchers/image_resource_fetcher.cc',
+ 'renderer/fetchers/image_resource_fetcher.h',
+ 'renderer/fetchers/multi_resolution_image_resource_fetcher.cc',
+ 'renderer/fetchers/multi_resolution_image_resource_fetcher.h',
+ 'renderer/fetchers/resource_fetcher.cc',
+ 'renderer/fetchers/resource_fetcher.h',
'renderer/render_process.h',
'renderer/render_process_impl.cc',
'renderer/render_process_impl.h',
diff --git a/webkit/glue/alt_error_page_resource_fetcher.cc b/content/renderer/fetchers/alt_error_page_resource_fetcher.cc
index 1fe8242..cbcab09 100644
--- a/webkit/glue/alt_error_page_resource_fetcher.cc
+++ b/content/renderer/fetchers/alt_error_page_resource_fetcher.cc
@@ -2,18 +2,18 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "webkit/glue/alt_error_page_resource_fetcher.h"
+#include "content/renderer/fetchers/alt_error_page_resource_fetcher.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
-#include "webkit/glue/resource_fetcher.h"
+#include "content/renderer/fetchers/resource_fetcher.h"
using WebKit::WebFrame;
using WebKit::WebURLError;
using WebKit::WebURLRequest;
using WebKit::WebURLResponse;
-namespace webkit_glue {
+namespace content {
// Number of seconds to wait for the alternate error page server. If it takes
// too long, just use the local error page.
@@ -53,4 +53,4 @@ void AltErrorPageResourceFetcher::OnURLFetchComplete(
}
}
-} // namespace webkit_glue
+} // namespace content
diff --git a/webkit/glue/alt_error_page_resource_fetcher.h b/content/renderer/fetchers/alt_error_page_resource_fetcher.h
index 00a4b93..14ffd7d 100644
--- a/webkit/glue/alt_error_page_resource_fetcher.h
+++ b/content/renderer/fetchers/alt_error_page_resource_fetcher.h
@@ -2,22 +2,21 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WEBKIT_GLUE_ALT_ERROR_PAGE_RESOURCE_FETCHER_H_
-#define WEBKIT_GLUE_ALT_ERROR_PAGE_RESOURCE_FETCHER_H_
+#ifndef CONTENT_RENDERER_FETCHERS_ALT_ERROR_PAGE_RESOURCE_FETCHER_H_
+#define CONTENT_RENDERER_FETCHERS_ALT_ERROR_PAGE_RESOURCE_FETCHER_H_
#include "base/callback.h"
#include "base/memory/scoped_ptr.h"
#include "googleurl/src/gurl.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebURLError.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebURLRequest.h"
-#include "webkit/glue/webkit_glue_export.h"
namespace WebKit {
class WebFrame;
class WebURLResponse;
}
-namespace webkit_glue {
+namespace content {
class ResourceFetcherWithTimeout;
// Used for downloading alternate dns error pages. Once downloading is done
@@ -32,13 +31,13 @@ class AltErrorPageResourceFetcher {
const WebKit::WebURLError&,
const std::string&)> Callback;
- WEBKIT_GLUE_EXPORT AltErrorPageResourceFetcher(
+ AltErrorPageResourceFetcher(
const GURL& url,
WebKit::WebFrame* frame,
const WebKit::WebURLRequest& original_request,
const WebKit::WebURLError& original_error,
const Callback& callback);
- WEBKIT_GLUE_EXPORT ~AltErrorPageResourceFetcher();
+ ~AltErrorPageResourceFetcher();
// Stop any pending loads.
void Cancel();
@@ -64,6 +63,6 @@ class AltErrorPageResourceFetcher {
DISALLOW_COPY_AND_ASSIGN(AltErrorPageResourceFetcher);
};
-} // namespace webkit_glue
+} // namespace content
-#endif // WEBKIT_GLUE_ALT_ERROR_PAGE_RESOURCE_FETCHER_H_
+#endif // CONTENT_RENDERER_FETCHERS_ALT_ERROR_PAGE_RESOURCE_FETCHER_H_
diff --git a/webkit/glue/image_resource_fetcher.cc b/content/renderer/fetchers/image_resource_fetcher.cc
index 3eaf2d6..8185e61 100644
--- a/webkit/glue/image_resource_fetcher.cc
+++ b/content/renderer/fetchers/image_resource_fetcher.cc
@@ -2,21 +2,21 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "webkit/glue/image_resource_fetcher.h"
+#include "content/renderer/fetchers/image_resource_fetcher.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/debug/crash_logging.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
+#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/gfx/size.h"
#include "webkit/glue/image_decoder.h"
-#include "third_party/skia/include/core/SkBitmap.h"
using WebKit::WebFrame;
using WebKit::WebURLRequest;
using WebKit::WebURLResponse;
-namespace webkit_glue {
+namespace content {
ImageResourceFetcher::ImageResourceFetcher(
const GURL& image_url,
@@ -49,7 +49,7 @@ void ImageResourceFetcher::OnURLFetchComplete(
SkBitmap bitmap;
if (!response.isNull() && response.httpStatusCode() == 200) {
// Request succeeded, try to convert it to an image.
- ImageDecoder decoder(gfx::Size(image_size_, image_size_));
+ webkit_glue::ImageDecoder decoder(gfx::Size(image_size_, image_size_));
bitmap = decoder.Decode(
reinterpret_cast<const unsigned char*>(data.data()), data.size());
} // else case:
@@ -63,4 +63,4 @@ void ImageResourceFetcher::OnURLFetchComplete(
callback.Run(this, bitmap);
}
-} // namespace webkit_glue
+} // namespace content
diff --git a/webkit/glue/image_resource_fetcher.h b/content/renderer/fetchers/image_resource_fetcher.h
index d1a4f7d..2ddb20d 100644
--- a/webkit/glue/image_resource_fetcher.h
+++ b/content/renderer/fetchers/image_resource_fetcher.h
@@ -2,17 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WEBKIT_GLUE_IMAGE_RESOURCE_FETCHER_H_
-#define WEBKIT_GLUE_IMAGE_RESOURCE_FETCHER_H_
+#ifndef CONTENT_RENDERER_FETCHERS_IMAGE_RESOURCE_FETCHER_H_
+#define CONTENT_RENDERER_FETCHERS_IMAGE_RESOURCE_FETCHER_H_
#include "base/basictypes.h"
#include "base/callback.h"
-#include "webkit/glue/resource_fetcher.h"
-#include "webkit/glue/webkit_glue_export.h"
+#include "content/renderer/fetchers/resource_fetcher.h"
class SkBitmap;
-namespace webkit_glue {
+namespace content {
// ImageResourceFetcher handles downloading an image for a webview. Once
// downloading is done the supplied callback is notified. ImageResourceFetcher
@@ -21,7 +20,7 @@ class ImageResourceFetcher {
public:
typedef base::Callback<void(ImageResourceFetcher*, const SkBitmap&)> Callback;
- WEBKIT_GLUE_EXPORT ImageResourceFetcher(
+ ImageResourceFetcher(
const GURL& image_url,
WebKit::WebFrame* frame,
int id,
@@ -29,7 +28,7 @@ class ImageResourceFetcher {
WebKit::WebURLRequest::TargetType target_type,
const Callback& callback);
- WEBKIT_GLUE_EXPORT virtual ~ImageResourceFetcher();
+ virtual ~ImageResourceFetcher();
// URL of the image we're downloading.
const GURL& image_url() const { return image_url_; }
@@ -61,6 +60,6 @@ class ImageResourceFetcher {
DISALLOW_COPY_AND_ASSIGN(ImageResourceFetcher);
};
-} // namespace webkit_glue
+} // namespace content
-#endif // WEBKIT_GLUE_IMAGE_RESOURCE_FETCHER_H_
+#endif // CONTENT_RENDERER_FETCHERS_IMAGE_RESOURCE_FETCHER_H_
diff --git a/webkit/glue/multi_resolution_image_resource_fetcher.cc b/content/renderer/fetchers/multi_resolution_image_resource_fetcher.cc
index e562cf9..33235c1 100644
--- a/webkit/glue/multi_resolution_image_resource_fetcher.cc
+++ b/content/renderer/fetchers/multi_resolution_image_resource_fetcher.cc
@@ -2,20 +2,20 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "webkit/glue/multi_resolution_image_resource_fetcher.h"
+#include "content/renderer/fetchers/multi_resolution_image_resource_fetcher.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
+#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/gfx/size.h"
#include "webkit/glue/image_decoder.h"
-#include "third_party/skia/include/core/SkBitmap.h"
using WebKit::WebFrame;
using WebKit::WebURLRequest;
using WebKit::WebURLResponse;
-namespace webkit_glue {
+namespace content {
MultiResolutionImageResourceFetcher::MultiResolutionImageResourceFetcher(
const GURL& image_url,
@@ -43,7 +43,7 @@ void MultiResolutionImageResourceFetcher::OnURLFetchComplete(
std::vector<SkBitmap> bitmaps;
if (!response.isNull() && response.httpStatusCode() == 200) {
// Request succeeded, try to convert it to an image.
- bitmaps = ImageDecoder::DecodeAll(
+ bitmaps = webkit_glue::ImageDecoder::DecodeAll(
reinterpret_cast<const unsigned char*>(data.data()), data.size());
} // else case:
// If we get here, it means no image from server or couldn't decode the
@@ -55,4 +55,4 @@ void MultiResolutionImageResourceFetcher::OnURLFetchComplete(
callback.Run(this, bitmaps);
}
-} // namespace webkit_glue
+} // namespace content
diff --git a/webkit/glue/multi_resolution_image_resource_fetcher.h b/content/renderer/fetchers/multi_resolution_image_resource_fetcher.h
index b316433..925eed2 100644
--- a/webkit/glue/multi_resolution_image_resource_fetcher.h
+++ b/content/renderer/fetchers/multi_resolution_image_resource_fetcher.h
@@ -2,19 +2,18 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WEBKIT_GLUE_MULTI_RESOLUTION_IMAGE_RESOURCE_FETCHER_H_
-#define WEBKIT_GLUE_MULTI_RESOLUTION_IMAGE_RESOURCE_FETCHER_H_
+#ifndef CONTENT_RENDERER_FETCHERS_MULTI_RESOLUTION_IMAGE_RESOURCE_FETCHER_H_
+#define CONTENT_RENDERER_FETCHERS_MULTI_RESOLUTION_IMAGE_RESOURCE_FETCHER_H_
#include <vector>
#include "base/basictypes.h"
#include "base/callback.h"
-#include "webkit/glue/resource_fetcher.h"
-#include "webkit/glue/webkit_glue_export.h"
+#include "content/renderer/fetchers/resource_fetcher.h"
class SkBitmap;
-namespace webkit_glue {
+namespace content {
// A resource fetcher that returns all (differently-sized) frames in
// an image. Useful for favicons.
@@ -23,14 +22,14 @@ class MultiResolutionImageResourceFetcher{
typedef base::Callback<void(MultiResolutionImageResourceFetcher*,
const std::vector<SkBitmap>&)> Callback;
- WEBKIT_GLUE_EXPORT MultiResolutionImageResourceFetcher(
+ MultiResolutionImageResourceFetcher(
const GURL& image_url,
WebKit::WebFrame* frame,
int id,
WebKit::WebURLRequest::TargetType target_type,
const Callback& callback);
- WEBKIT_GLUE_EXPORT virtual ~MultiResolutionImageResourceFetcher();
+ virtual ~MultiResolutionImageResourceFetcher();
// URL of the image we're downloading.
const GURL& image_url() const { return image_url_; }
@@ -57,6 +56,6 @@ class MultiResolutionImageResourceFetcher{
DISALLOW_COPY_AND_ASSIGN(MultiResolutionImageResourceFetcher);
};
-} // namespace webkit_glue
+} // namespace content
-#endif // WEBKIT_GLUE_MULTI_RESOLUTION_IMAGE_RESOURCE_FETCHER_H_
+#endif // CONTENT_RENDERER_FETCHERS_MULTI_RESOLUTION_IMAGE_RESOURCE_FETCHER_H_
diff --git a/webkit/glue/resource_fetcher.cc b/content/renderer/fetchers/resource_fetcher.cc
index 5d3d229..bbb7959 100644
--- a/webkit/glue/resource_fetcher.cc
+++ b/content/renderer/fetchers/resource_fetcher.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "webkit/glue/resource_fetcher.h"
+#include "content/renderer/fetchers/resource_fetcher.h"
#include "base/logging.h"
#include "third_party/WebKit/Source/Platform/chromium/public/Platform.h"
@@ -21,7 +21,7 @@ using WebKit::WebURLLoader;
using WebKit::WebURLRequest;
using WebKit::WebURLResponse;
-namespace webkit_glue {
+namespace content {
ResourceFetcher::ResourceFetcher(const GURL& url, WebFrame* frame,
WebURLRequest::TargetType target_type,
@@ -142,4 +142,4 @@ void ResourceFetcherWithTimeout::TimeoutFired() {
}
}
-} // namespace webkit_glue
+} // namespace content
diff --git a/webkit/glue/resource_fetcher.h b/content/renderer/fetchers/resource_fetcher.h
index 60d3743..1580d20 100644
--- a/webkit/glue/resource_fetcher.h
+++ b/content/renderer/fetchers/resource_fetcher.h
@@ -9,8 +9,8 @@
// ResourceFetcher::Delegate::OnURLFetchComplete will be called async after
// the ResourceFetcher object is created.
-#ifndef WEBKIT_GLUE_RESOURCE_FETCHER_H_
-#define WEBKIT_GLUE_RESOURCE_FETCHER_H_
+#ifndef CONTENT_RENDERER_FETCHERS_RESOURCE_FETCHER_H_
+#define CONTENT_RENDERER_FETCHERS_RESOURCE_FETCHER_H_
#include <string>
@@ -19,11 +19,11 @@
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "base/timer.h"
+#include "content/common/content_export.h"
#include "googleurl/src/gurl.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebURLLoaderClient.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebURLRequest.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebURLResponse.h"
-#include "webkit/glue/webkit_glue_export.h"
class GURL;
@@ -33,10 +33,10 @@ class WebURLLoader;
struct WebURLError;
}
-namespace webkit_glue {
+namespace content {
-class WEBKIT_GLUE_EXPORT ResourceFetcher :
- NON_EXPORTED_BASE(public WebKit::WebURLLoaderClient) {
+class CONTENT_EXPORT ResourceFetcher
+ : NON_EXPORTED_BASE(public WebKit::WebURLLoaderClient) {
public:
// This will be called when the URL has been fetched, successfully or not.
// If there is a failure, response and data will both be empty. |response|
@@ -110,7 +110,8 @@ class WEBKIT_GLUE_EXPORT ResourceFetcher :
/////////////////////////////////////////////////////////////////////////////
// A resource fetcher with a timeout
-class WEBKIT_GLUE_EXPORT ResourceFetcherWithTimeout : public ResourceFetcher {
+class CONTENT_EXPORT ResourceFetcherWithTimeout
+ : NON_EXPORTED_BASE(public ResourceFetcher) {
public:
ResourceFetcherWithTimeout(const GURL& url,
WebKit::WebFrame* frame,
@@ -129,6 +130,6 @@ class WEBKIT_GLUE_EXPORT ResourceFetcherWithTimeout : public ResourceFetcher {
base::OneShotTimer<ResourceFetcherWithTimeout> timeout_timer_;
};
-} // namespace webkit_glue
+} // namespace content
-#endif // WEBKIT_GLUE_RESOURCE_FETCHER_H_
+#endif // CONTENT_RENDERER_FETCHERS_RESOURCE_FETCHER_H_
diff --git a/content/renderer/image_loading_helper.cc b/content/renderer/image_loading_helper.cc
index ff6e2bd..5f936a41f3 100644
--- a/content/renderer/image_loading_helper.cc
+++ b/content/renderer/image_loading_helper.cc
@@ -9,6 +9,7 @@
#include "content/common/image_messages.h"
#include "content/public/common/url_constants.h"
#include "content/public/renderer/render_view.h"
+#include "content/renderer/fetchers/multi_resolution_image_resource_fetcher.h"
#include "net/base/data_url.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebURLRequest.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebVector.h"
@@ -18,14 +19,12 @@
#include "ui/gfx/size.h"
#include "ui/gfx/skbitmap_operations.h"
#include "webkit/glue/image_decoder.h"
-#include "webkit/glue/multi_resolution_image_resource_fetcher.h"
#include "webkit/glue/webkit_glue.h"
using WebKit::WebFrame;
using WebKit::WebVector;
using WebKit::WebURL;
using WebKit::WebURLRequest;
-using webkit_glue::MultiResolutionImageResourceFetcher;
namespace content {
diff --git a/content/renderer/image_loading_helper.h b/content/renderer/image_loading_helper.h
index 6e2302d..6856aa3 100644
--- a/content/renderer/image_loading_helper.h
+++ b/content/renderer/image_loading_helper.h
@@ -14,12 +14,10 @@
class SkBitmap;
-namespace webkit_glue {
-class MultiResolutionImageResourceFetcher;
-}
-
namespace content {
+class MultiResolutionImageResourceFetcher;
+
// This class deals with image downloading.
// One instance of ImageLoadingHelper is owned by RenderView.
class ImageLoadingHelper : public RenderViewObserver {
@@ -53,7 +51,7 @@ class ImageLoadingHelper : public RenderViewObserver {
// details.
void DidDownloadImage(
int requested_size,
- webkit_glue::MultiResolutionImageResourceFetcher* fetcher,
+ MultiResolutionImageResourceFetcher* fetcher,
const std::vector<SkBitmap>& images);
// Decodes a data: URL image or returns an empty image in case of failure.
@@ -62,7 +60,7 @@ class ImageLoadingHelper : public RenderViewObserver {
// RenderViewObserver implementation.
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
- typedef ScopedVector<webkit_glue::MultiResolutionImageResourceFetcher>
+ typedef ScopedVector<MultiResolutionImageResourceFetcher>
ImageResourceFetcherList;
// ImageResourceFetchers schedule via DownloadImage.
diff --git a/content/renderer/internal_document_state_data.cc b/content/renderer/internal_document_state_data.cc
index d5da984..b63410a 100644
--- a/content/renderer/internal_document_state_data.cc
+++ b/content/renderer/internal_document_state_data.cc
@@ -6,8 +6,8 @@
#include "content/public/common/password_form.h"
#include "content/public/renderer/document_state.h"
+#include "content/renderer/fetchers/alt_error_page_resource_fetcher.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h"
-#include "webkit/glue/alt_error_page_resource_fetcher.h"
namespace content {
@@ -55,7 +55,7 @@ InternalDocumentStateData::~InternalDocumentStateData() {
}
void InternalDocumentStateData::set_alt_error_page_fetcher(
- webkit_glue::AltErrorPageResourceFetcher* f) {
+ AltErrorPageResourceFetcher* f) {
alt_error_page_fetcher_.reset(f);
}
diff --git a/content/renderer/internal_document_state_data.h b/content/renderer/internal_document_state_data.h
index 08ca357..223e9ad 100644
--- a/content/renderer/internal_document_state_data.h
+++ b/content/renderer/internal_document_state_data.h
@@ -13,16 +13,13 @@
#include "third_party/WebKit/Source/Platform/chromium/public/WebReferrerPolicy.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebURLRequest.h"
-namespace webkit_glue {
-class AltErrorPageResourceFetcher;
-}
-
namespace WebKit {
class WebDataSource;
}
namespace content {
+class AltErrorPageResourceFetcher;
class DocumentState;
// Stores internal state per WebDataSource.
@@ -123,10 +120,10 @@ class InternalDocumentStateData : public base::SupportsUserData::Data {
}
bool is_referrer_policy_set() const { return referrer_policy_set_; }
- webkit_glue::AltErrorPageResourceFetcher* alt_error_page_fetcher() const {
+ AltErrorPageResourceFetcher* alt_error_page_fetcher() const {
return alt_error_page_fetcher_.get();
}
- void set_alt_error_page_fetcher(webkit_glue::AltErrorPageResourceFetcher* f);
+ void set_alt_error_page_fetcher(AltErrorPageResourceFetcher* f);
protected:
virtual ~InternalDocumentStateData();
@@ -144,7 +141,7 @@ class InternalDocumentStateData : public base::SupportsUserData::Data {
WebKit::WebURLRequest::CachePolicy cache_policy_override_;
bool referrer_policy_set_;
WebKit::WebReferrerPolicy referrer_policy_;
- scoped_ptr<webkit_glue::AltErrorPageResourceFetcher> alt_error_page_fetcher_;
+ scoped_ptr<AltErrorPageResourceFetcher> alt_error_page_fetcher_;
DISALLOW_COPY_AND_ASSIGN(InternalDocumentStateData);
};
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index a189b7b..5aa6276 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -74,6 +74,7 @@
#include "content/renderer/dom_automation_controller.h"
#include "content/renderer/dom_storage/webstoragenamespace_impl.h"
#include "content/renderer/external_popup_menu.h"
+#include "content/renderer/fetchers/alt_error_page_resource_fetcher.h"
#include "content/renderer/geolocation_dispatcher.h"
#include "content/renderer/gpu/input_handler_manager.h"
#include "content/renderer/gpu/render_widget_compositor.h"
@@ -122,8 +123,6 @@
#include "net/base/net_errors.h"
#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
#include "net/http/http_util.h"
-#include "third_party/skia/include/core/SkBitmap.h"
-#include "third_party/skia/include/core/SkPicture.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebCString.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebDragData.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebFileSystemType.h"
@@ -182,6 +181,8 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebWindowFeatures.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/default/WebRenderTheme.h"
+#include "third_party/skia/include/core/SkBitmap.h"
+#include "third_party/skia/include/core/SkPicture.h"
#include "ui/base/ui_base_switches_util.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/point.h"
@@ -193,7 +194,6 @@
#include "webkit/appcache/web_application_cache_host_impl.h"
#include "webkit/base/file_path_string_conversions.h"
#include "webkit/dom_storage/dom_storage_types.h"
-#include "webkit/glue/alt_error_page_resource_fetcher.h"
#include "webkit/glue/dom_operations.h"
#include "webkit/glue/glue_serialize.h"
#include "webkit/glue/webdropdata.h"
@@ -324,8 +324,6 @@ using appcache::WebApplicationCacheHostImpl;
using base::Time;
using base::TimeDelta;
-using webkit_glue::AltErrorPageResourceFetcher;
-using webkit_glue::ResourceFetcher;
using webkit_glue::WebURLResponseExtraDataImpl;
#if defined(OS_ANDROID)
diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h
index 466f293..7d7e8f3 100644
--- a/content/renderer/render_view_impl.h
+++ b/content/renderer/render_view_impl.h
@@ -90,11 +90,6 @@ class PluginInstance;
} // namespace webkit
-namespace webkit_glue {
-class ImageResourceFetcher;
-class ResourceFetcher;
-}
-
#if defined(OS_ANDROID)
namespace webkit_media {
class WebMediaPlayerManagerAndroid;
@@ -150,6 +145,7 @@ class DomAutomationController;
class ExternalPopupMenu;
class FaviconHelper;
class GeolocationDispatcher;
+class ImageResourceFetcher;
class InputTagSpeechDispatcher;
class JavaBridgeDispatcher;
class LoadProgressTracker;
@@ -758,7 +754,7 @@ class CONTENT_EXPORT RenderViewImpl
// Cannot use std::set unfortunately since linked_ptr<> does not support
// operator<.
- typedef std::vector<linked_ptr<webkit_glue::ImageResourceFetcher> >
+ typedef std::vector<linked_ptr<ImageResourceFetcher> >
ImageResourceFetcherList;
protected:
@@ -1085,7 +1081,7 @@ class CONTENT_EXPORT RenderViewImpl
// This callback is triggered when DownloadFavicon completes, either
// succesfully or with a failure. See DownloadFavicon for more
// details.
- void DidDownloadFavicon(webkit_glue::ImageResourceFetcher* fetcher,
+ void DidDownloadFavicon(ImageResourceFetcher* fetcher,
const SkBitmap& image);
// Requests to download a favicon image. When done, the RenderView is notified
diff --git a/content/renderer/resource_fetcher_browsertest.cc b/content/renderer/resource_fetcher_browsertest.cc
index e7e0c36..f246a3b 100644
--- a/content/renderer/resource_fetcher_browsertest.cc
+++ b/content/renderer/resource_fetcher_browsertest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "webkit/glue/resource_fetcher.h"
+#include "content/renderer/fetchers/resource_fetcher.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
@@ -22,8 +22,6 @@
using WebKit::WebFrame;
using WebKit::WebURLRequest;
using WebKit::WebURLResponse;
-using webkit_glue::ResourceFetcher;
-using webkit_glue::ResourceFetcherWithTimeout;
namespace content {
diff --git a/webkit/glue/webkit_glue.gypi b/webkit/glue/webkit_glue.gypi
index a163dfb..e70f0f1 100644
--- a/webkit/glue/webkit_glue.gypi
+++ b/webkit/glue/webkit_glue.gypi
@@ -249,8 +249,6 @@
'../plugins/webkit_plugins_export.h',
'../plugins/webplugininfo.cc',
'../plugins/webplugininfo.h',
- 'alt_error_page_resource_fetcher.cc',
- 'alt_error_page_resource_fetcher.h',
'cpp_bound_class.cc',
'cpp_bound_class.h',
'cpp_variant.cc',
@@ -267,17 +265,11 @@
'glue_serialize.h',
'image_decoder.cc',
'image_decoder.h',
- 'image_resource_fetcher.cc',
- 'image_resource_fetcher.h',
- 'multi_resolution_image_resource_fetcher.cc',
- 'multi_resolution_image_resource_fetcher.h',
'multipart_response_delegate.cc',
'multipart_response_delegate.h',
'network_list_observer.h',
'npruntime_util.cc',
'npruntime_util.h',
- 'resource_fetcher.cc',
- 'resource_fetcher.h',
'resource_loader_bridge.cc',
'resource_loader_bridge.h',
'resource_request_body.cc',