summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-09 10:30:25 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-09 10:30:25 +0000
commit80d42818b9f89df2089de425ebfb6784a5592581 (patch)
tree20caab18c7df619142a5958353aac06610a5b30f
parent3dfc5dc39fa4c3f9bf9b31be5958c5e8221a1830 (diff)
downloadchromium_src-80d42818b9f89df2089de425ebfb6784a5592581.zip
chromium_src-80d42818b9f89df2089de425ebfb6784a5592581.tar.gz
chromium_src-80d42818b9f89df2089de425ebfb6784a5592581.tar.bz2
[GTTF] Reduce header dependencies in webkit
TEST=none BUG=none Review URL: http://codereview.chromium.org/582015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38461 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/renderer_host/resource_message_filter.cc3
-rw-r--r--webkit/appcache/appcache_host.cc1
-rw-r--r--webkit/appcache/appcache_host.h1
-rw-r--r--webkit/appcache/appcache_request_handler.h1
-rw-r--r--webkit/appcache/appcache_request_handler_unittest.cc1
-rw-r--r--webkit/appcache/appcache_response_unittest.cc1
-rw-r--r--webkit/appcache/appcache_storage.cc35
-rw-r--r--webkit/appcache/appcache_storage.h39
-rw-r--r--webkit/appcache/appcache_storage_impl_unittest.cc2
-rw-r--r--webkit/appcache/appcache_update_job.cc1
-rw-r--r--webkit/appcache/appcache_update_job_unittest.cc1
-rw-r--r--webkit/appcache/appcache_url_request_job.cc1
-rw-r--r--webkit/appcache/appcache_url_request_job_unittest.cc1
-rw-r--r--webkit/glue/bookmarklet_unittest.cc1
-rw-r--r--webkit/glue/context_menu_unittest.cc2
-rw-r--r--webkit/tools/test_shell/event_sending_controller.cc1
-rw-r--r--webkit/tools/test_shell/layout_test_controller.cc1
-rw-r--r--webkit/tools/test_shell/plain_text_controller.cc1
-rw-r--r--webkit/tools/test_shell/test_shell.cc1
-rw-r--r--webkit/tools/test_shell/test_shell.h4
-rw-r--r--webkit/tools/test_shell/test_shell_mac.mm1
-rw-r--r--webkit/tools/test_shell/test_shell_test.cc1
-rw-r--r--webkit/tools/test_shell/test_shell_win.cc1
23 files changed, 68 insertions, 34 deletions
diff --git a/chrome/browser/renderer_host/resource_message_filter.cc b/chrome/browser/renderer_host/resource_message_filter.cc
index c7870dd..2c04259 100644
--- a/chrome/browser/renderer_host/resource_message_filter.cc
+++ b/chrome/browser/renderer_host/resource_message_filter.cc
@@ -51,8 +51,9 @@
#include "chrome/common/worker_messages.h"
#include "net/base/cookie_monster.h"
#include "net/base/keygen_handler.h"
-#include "net/base/mime_util.h"
#include "net/base/load_flags.h"
+#include "net/base/mime_util.h"
+#include "net/base/net_errors.h"
#include "net/http/http_cache.h"
#include "net/http/http_transaction_factory.h"
#include "net/url_request/url_request_context.h"
diff --git a/webkit/appcache/appcache_host.cc b/webkit/appcache/appcache_host.cc
index 58212f5..9d1bf9c 100644
--- a/webkit/appcache/appcache_host.cc
+++ b/webkit/appcache/appcache_host.cc
@@ -5,6 +5,7 @@
#include "webkit/appcache/appcache_host.h"
#include "base/logging.h"
+#include "webkit/appcache/appcache.h"
#include "webkit/appcache/appcache_request_handler.h"
namespace appcache {
diff --git a/webkit/appcache/appcache_host.h b/webkit/appcache/appcache_host.h
index 3029cd3..fe24b9b 100644
--- a/webkit/appcache/appcache_host.h
+++ b/webkit/appcache/appcache_host.h
@@ -10,7 +10,6 @@
#include "base/task.h"
#include "googleurl/src/gurl.h"
#include "testing/gtest/include/gtest/gtest_prod.h"
-#include "webkit/appcache/appcache.h"
#include "webkit/appcache/appcache_group.h"
#include "webkit/appcache/appcache_interfaces.h"
#include "webkit/appcache/appcache_service.h"
diff --git a/webkit/appcache/appcache_request_handler.h b/webkit/appcache/appcache_request_handler.h
index 55b4ef7..2e51d61 100644
--- a/webkit/appcache/appcache_request_handler.h
+++ b/webkit/appcache/appcache_request_handler.h
@@ -6,6 +6,7 @@
#define WEBKIT_APPCACHE_APPCACHE_REQUEST_HANDLER_H_
#include "net/url_request/url_request.h"
+#include "webkit/appcache/appcache_entry.h"
#include "webkit/appcache/appcache_host.h"
class URLRequest;
diff --git a/webkit/appcache/appcache_request_handler_unittest.cc b/webkit/appcache/appcache_request_handler_unittest.cc
index 7bbce32..88f3d03 100644
--- a/webkit/appcache/appcache_request_handler_unittest.cc
+++ b/webkit/appcache/appcache_request_handler_unittest.cc
@@ -5,6 +5,7 @@
#include "base/message_loop.h"
#include "base/thread.h"
#include "base/waitable_event.h"
+#include "net/base/net_errors.h"
#include "net/url_request/url_request.h"
#include "net/url_request/url_request_error_job.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/webkit/appcache/appcache_response_unittest.cc b/webkit/appcache/appcache_response_unittest.cc
index 2989592..8954e47 100644
--- a/webkit/appcache/appcache_response_unittest.cc
+++ b/webkit/appcache/appcache_response_unittest.cc
@@ -7,6 +7,7 @@
#include "base/thread.h"
#include "base/waitable_event.h"
#include "net/base/io_buffer.h"
+#include "net/base/net_errors.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "webkit/appcache/appcache_response.h"
#include "webkit/appcache/mock_appcache_service.h"
diff --git a/webkit/appcache/appcache_storage.cc b/webkit/appcache/appcache_storage.cc
index eb0c23f..50565af 100644
--- a/webkit/appcache/appcache_storage.cc
+++ b/webkit/appcache/appcache_storage.cc
@@ -5,6 +5,7 @@
#include "webkit/appcache/appcache_storage.h"
#include "base/stl_util-inl.h"
+#include "webkit/appcache/appcache_response.h"
namespace appcache {
@@ -21,6 +22,40 @@ AppCacheStorage::~AppCacheStorage() {
DCHECK(delegate_references_.empty());
}
+AppCacheStorage::ResponseInfoLoadTask::ResponseInfoLoadTask(
+ const GURL& manifest_url,
+ int64 response_id,
+ AppCacheStorage* storage)
+ : storage_(storage),
+ manifest_url_(manifest_url),
+ response_id_(response_id),
+ info_buffer_(new HttpResponseInfoIOBuffer),
+ ALLOW_THIS_IN_INITIALIZER_LIST(read_callback_(
+ this, &ResponseInfoLoadTask::OnReadComplete)) {
+ storage_->pending_info_loads_.insert(
+ PendingResponseInfoLoads::value_type(response_id, this));
+}
+
+void AppCacheStorage::ResponseInfoLoadTask::StartIfNeeded() {
+ if (reader_.get())
+ return;
+ reader_.reset(
+ storage_->CreateResponseReader(manifest_url_, response_id_));
+ reader_->ReadInfo(info_buffer_, &read_callback_);
+}
+
+void AppCacheStorage::ResponseInfoLoadTask::OnReadComplete(int result) {
+ storage_->pending_info_loads_.erase(response_id_);
+ scoped_refptr<AppCacheResponseInfo> info;
+ if (result >= 0) {
+ info = new AppCacheResponseInfo(storage_->service(), manifest_url_,
+ response_id_,
+ info_buffer_->http_info.release());
+ }
+ FOR_EACH_DELEGATE(delegates_, OnResponseInfoLoaded(info.get(), response_id_));
+ delete this;
+}
+
void AppCacheStorage::LoadResponseInfo(
const GURL& manifest_url, int64 id, Delegate* delegate) {
AppCacheResponseInfo* info = working_set_.GetResponseInfo(id);
diff --git a/webkit/appcache/appcache_storage.h b/webkit/appcache/appcache_storage.h
index cfa27a5..4c51e39 100644
--- a/webkit/appcache/appcache_storage.h
+++ b/webkit/appcache/appcache_storage.h
@@ -11,9 +11,9 @@
#include "base/compiler_specific.h"
#include "base/basictypes.h"
#include "base/ref_counted.h"
-#include "net/base/net_errors.h"
+#include "base/scoped_ptr.h"
+#include "net/base/completion_callback.h"
#include "testing/gtest/include/gtest/gtest_prod.h"
-#include "webkit/appcache/appcache_response.h"
#include "webkit/appcache/appcache_working_set.h"
class GURL;
@@ -23,7 +23,10 @@ namespace appcache {
class AppCache;
class AppCacheEntry;
class AppCacheGroup;
+class AppCacheResponseReader;
+class AppCacheResponseWriter;
class AppCacheService;
+struct HttpResponseInfoIOBuffer;
class AppCacheStorage {
public:
@@ -216,16 +219,7 @@ class AppCacheStorage {
class ResponseInfoLoadTask {
public:
ResponseInfoLoadTask(const GURL& manifest_url, int64 response_id,
- AppCacheStorage* storage)
- : storage_(storage),
- manifest_url_(manifest_url),
- response_id_(response_id),
- info_buffer_(new HttpResponseInfoIOBuffer),
- ALLOW_THIS_IN_INITIALIZER_LIST(read_callback_(
- this, &ResponseInfoLoadTask::OnReadComplete)) {
- storage_->pending_info_loads_.insert(
- PendingResponseInfoLoads::value_type(response_id, this));
- }
+ AppCacheStorage* storage);
int64 response_id() const { return response_id_; }
const GURL& manifest_url() const { return manifest_url_; }
@@ -234,27 +228,10 @@ class AppCacheStorage {
delegates_.push_back(delegate_reference);
}
- void StartIfNeeded() {
- if (reader_.get())
- return;
- reader_.reset(
- storage_->CreateResponseReader(manifest_url_, response_id_));
- reader_->ReadInfo(info_buffer_, &read_callback_);
- }
+ void StartIfNeeded();
private:
- void OnReadComplete(int result) {
- storage_->pending_info_loads_.erase(response_id_);
- scoped_refptr<AppCacheResponseInfo> info;
- if (result >= 0) {
- info = new AppCacheResponseInfo(
- storage_->service(), manifest_url_, response_id_,
- info_buffer_->http_info.release());
- }
- FOR_EACH_DELEGATE(
- delegates_, OnResponseInfoLoaded(info.get(), response_id_));
- delete this;
- }
+ void OnReadComplete(int result);
AppCacheStorage* storage_;
GURL manifest_url_;
diff --git a/webkit/appcache/appcache_storage_impl_unittest.cc b/webkit/appcache/appcache_storage_impl_unittest.cc
index a50f7412..e9d9e21 100644
--- a/webkit/appcache/appcache_storage_impl_unittest.cc
+++ b/webkit/appcache/appcache_storage_impl_unittest.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <stack>
+
#include "base/message_loop.h"
#include "base/thread.h"
#include "base/waitable_event.h"
diff --git a/webkit/appcache/appcache_update_job.cc b/webkit/appcache/appcache_update_job.cc
index cab10ea..89dcb4f 100644
--- a/webkit/appcache/appcache_update_job.cc
+++ b/webkit/appcache/appcache_update_job.cc
@@ -10,6 +10,7 @@
#include "net/base/io_buffer.h"
#include "net/base/load_flags.h"
#include "webkit/appcache/appcache_group.h"
+#include "webkit/appcache/appcache_response.h"
namespace appcache {
diff --git a/webkit/appcache/appcache_update_job_unittest.cc b/webkit/appcache/appcache_update_job_unittest.cc
index d07234f..d41e486 100644
--- a/webkit/appcache/appcache_update_job_unittest.cc
+++ b/webkit/appcache/appcache_update_job_unittest.cc
@@ -11,6 +11,7 @@
#include "net/url_request/url_request_unittest.h"
#include "webkit/appcache/appcache_group.h"
#include "webkit/appcache/appcache_host.h"
+#include "webkit/appcache/appcache_response.h"
#include "webkit/appcache/appcache_update_job.h"
#include "webkit/appcache/mock_appcache_service.h"
diff --git a/webkit/appcache/appcache_url_request_job.cc b/webkit/appcache/appcache_url_request_job.cc
index a616394..bf52950 100644
--- a/webkit/appcache/appcache_url_request_job.cc
+++ b/webkit/appcache/appcache_url_request_job.cc
@@ -8,6 +8,7 @@
#include "base/message_loop.h"
#include "base/string_util.h"
+#include "net/base/net_errors.h"
#include "net/http/http_util.h"
#include "net/url_request/url_request_status.h"
diff --git a/webkit/appcache/appcache_url_request_job_unittest.cc b/webkit/appcache/appcache_url_request_job_unittest.cc
index 39a1b91..cc4b853 100644
--- a/webkit/appcache/appcache_url_request_job_unittest.cc
+++ b/webkit/appcache/appcache_url_request_job_unittest.cc
@@ -6,6 +6,7 @@
#include "base/pickle.h"
#include "base/thread.h"
#include "base/waitable_event.h"
+#include "net/base/net_errors.h"
#include "net/url_request/url_request.h"
#include "net/url_request/url_request_error_job.h"
#include "net/base/io_buffer.h"
diff --git a/webkit/glue/bookmarklet_unittest.cc b/webkit/glue/bookmarklet_unittest.cc
index 4da9838..5d8a364 100644
--- a/webkit/glue/bookmarklet_unittest.cc
+++ b/webkit/glue/bookmarklet_unittest.cc
@@ -6,6 +6,7 @@
#include "base/message_loop.h"
#include "base/path_service.h"
#include "base/string_util.h"
+#include "googleurl/src/gurl.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "webkit/tools/test_shell/test_shell_test.h"
diff --git a/webkit/glue/context_menu_unittest.cc b/webkit/glue/context_menu_unittest.cc
index 80bc02c..9cefc9f 100644
--- a/webkit/glue/context_menu_unittest.cc
+++ b/webkit/glue/context_menu_unittest.cc
@@ -10,9 +10,11 @@
#include "base/file_path.h"
#include "base/file_util.h"
#include "base/message_loop.h"
+#include "googleurl/src/gurl.h"
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
#include "webkit/glue/webkit_glue.h"
#include "webkit/tools/test_shell/test_shell_test.h"
+#include "webkit/tools/test_shell/test_webview_delegate.h"
using WebKit::WebInputEvent;
using WebKit::WebMouseEvent;
diff --git a/webkit/tools/test_shell/event_sending_controller.cc b/webkit/tools/test_shell/event_sending_controller.cc
index d563a08..2ecd6a8 100644
--- a/webkit/tools/test_shell/event_sending_controller.cc
+++ b/webkit/tools/test_shell/event_sending_controller.cc
@@ -33,6 +33,7 @@
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
#include "webkit/glue/webkit_glue.h"
#include "webkit/tools/test_shell/test_shell.h"
+#include "webkit/tools/test_shell/test_webview_delegate.h"
#if defined(OS_WIN)
#include "third_party/WebKit/WebKit/chromium/public/win/WebInputEventFactory.h"
diff --git a/webkit/tools/test_shell/layout_test_controller.cc b/webkit/tools/test_shell/layout_test_controller.cc
index 66cbf14..ba08aa6 100644
--- a/webkit/tools/test_shell/layout_test_controller.cc
+++ b/webkit/tools/test_shell/layout_test_controller.cc
@@ -30,6 +30,7 @@
#include "webkit/tools/test_shell/test_navigation_controller.h"
#include "webkit/tools/test_shell/test_shell.h"
#include "webkit/tools/test_shell/test_shell_devtools_agent.h"
+#include "webkit/tools/test_shell/test_webview_delegate.h"
using std::string;
using std::wstring;
diff --git a/webkit/tools/test_shell/plain_text_controller.cc b/webkit/tools/test_shell/plain_text_controller.cc
index 426824d..aba469e 100644
--- a/webkit/tools/test_shell/plain_text_controller.cc
+++ b/webkit/tools/test_shell/plain_text_controller.cc
@@ -8,6 +8,7 @@
#include "webkit/tools/test_shell/test_shell.h"
#include "third_party/WebKit/WebKit/chromium/public/WebBindings.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebCString.h"
#include "third_party/WebKit/WebKit/chromium/public/WebRange.h"
#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc
index 63c5a52..8d37a81 100644
--- a/webkit/tools/test_shell/test_shell.cc
+++ b/webkit/tools/test_shell/test_shell.cc
@@ -51,6 +51,7 @@
#include "webkit/tools/test_shell/test_shell_devtools_agent.h"
#include "webkit/tools/test_shell/test_shell_devtools_client.h"
#include "webkit/tools/test_shell/test_shell_switches.h"
+#include "webkit/tools/test_shell/test_webview_delegate.h"
using WebKit::WebCanvas;
using WebKit::WebFrame;
diff --git a/webkit/tools/test_shell/test_shell.h b/webkit/tools/test_shell/test_shell.h
index 73fe3a3..10f6371 100644
--- a/webkit/tools/test_shell/test_shell.h
+++ b/webkit/tools/test_shell/test_shell.h
@@ -38,11 +38,11 @@
#endif
#include "base/ref_counted.h"
#include "base/weak_ptr.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebNavigationPolicy.h"
#include "webkit/tools/test_shell/event_sending_controller.h"
#include "webkit/tools/test_shell/layout_test_controller.h"
#include "webkit/tools/test_shell/plain_text_controller.h"
#include "webkit/tools/test_shell/text_input_controller.h"
-#include "webkit/tools/test_shell/test_webview_delegate.h"
#include "webkit/tools/test_shell/webview_host.h"
#include "webkit/tools/test_shell/webwidget_host.h"
@@ -51,10 +51,12 @@ typedef std::list<gfx::NativeWindow> WindowList;
struct WebPreferences;
class AccessibilityController;
class FilePath;
+class GURL;
class TestNavigationEntry;
class TestNavigationController;
class TestShellDevToolsAgent;
class TestShellDevToolsClient;
+class TestWebViewDelegate;
namespace base {
class StringPiece;
diff --git a/webkit/tools/test_shell/test_shell_mac.mm b/webkit/tools/test_shell/test_shell_mac.mm
index c3760de..889f4b5 100644
--- a/webkit/tools/test_shell/test_shell_mac.mm
+++ b/webkit/tools/test_shell/test_shell_mac.mm
@@ -37,6 +37,7 @@
#include "webkit/tools/test_shell/resource.h"
#include "webkit/tools/test_shell/simple_resource_loader_bridge.h"
#include "webkit/tools/test_shell/test_navigation_controller.h"
+#include "webkit/tools/test_shell/test_webview_delegate.h"
#include "third_party/skia/include/core/SkBitmap.h"
diff --git a/webkit/tools/test_shell/test_shell_test.cc b/webkit/tools/test_shell/test_shell_test.cc
index a85b618..ea09877a 100644
--- a/webkit/tools/test_shell/test_shell_test.cc
+++ b/webkit/tools/test_shell/test_shell_test.cc
@@ -12,6 +12,7 @@
#include "base/message_loop.h"
#include "base/path_service.h"
#include "base/string_util.h"
+#include "googleurl/src/gurl.h"
#include "net/base/net_util.h"
GURL TestShellTest::GetTestURL(const FilePath& test_case_path,
diff --git a/webkit/tools/test_shell/test_shell_win.cc b/webkit/tools/test_shell/test_shell_win.cc
index 5aaea38..6552b0e 100644
--- a/webkit/tools/test_shell/test_shell_win.cc
+++ b/webkit/tools/test_shell/test_shell_win.cc
@@ -35,6 +35,7 @@
#include "webkit/tools/test_shell/resource.h"
#include "webkit/tools/test_shell/test_navigation_controller.h"
#include "webkit/tools/test_shell/test_shell_switches.h"
+#include "webkit/tools/test_shell/test_webview_delegate.h"
using WebKit::WebWidget;