diff options
author | bryeung@chromium.org <bryeung@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-22 18:56:10 +0000 |
---|---|---|
committer | bryeung@chromium.org <bryeung@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-22 18:56:10 +0000 |
commit | 34404b66acf8b88ed094f2492069c299fc7fd1a1 (patch) | |
tree | 8d904da942e8edc12c6cdf81dbb6839649afadce | |
parent | bd0690ee89bf3843fdb0ac3a0154fde687595f1a (diff) | |
download | chromium_src-34404b66acf8b88ed094f2492069c299fc7fd1a1.zip chromium_src-34404b66acf8b88ed094f2492069c299fc7fd1a1.tar.gz chromium_src-34404b66acf8b88ed094f2492069c299fc7fd1a1.tar.bz2 |
Revert 212927 "Move webkitplatformsupport_impl and related from ..."
> Move webkitplatformsupport_impl and related from glue to child
>
> Picking up Ananta's change.
>
> Move the webkitplatformsupport_impl.cc/.h files out of webkit\glue to
> webkit\child.
>
> This requires moving the following files out of webkit\glue to webkit\child:
> 1. weburlloader_impl.cc/.h
> 2. weburlrequest_extradata_impl.cc/.h
> 3. websocketstreamhandle_impl.cc/.h
> 4. weburlresponse_extradata_impl.cc/.h
> 5. websocketstreamhandle_delegate.h
> 6. ftp_directory_listing_response_delegate.cc/.h
> 7. multipart_response_delegate.cc/.h
> 8. multipart_response_delegate_unittest.cc
> 9. resource_loader_bridge.cc/.h
>
> The following files have been moved to webkit\common:
> 2. resource_type.cc/.h
>
> Move MemoryUsageKB out of webkit_glue.cc/h to webkit/child/webkit_child_helpers.
>
> I added an include rule to content\common\DEPS to allow including
> webkit\child\websocketstreamhandle_delegate.h. This will be removed in a
> followup.
>
> TBR=jam@chromium.org, jamesr@chromium.org, jschuh@chromium.org
>
> BUG=237249
>
> Review URL: https://codereview.chromium.org/19673002
TBR=scottmg@chromium.org
Review URL: https://codereview.chromium.org/19888003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212933 0039d316-1c4b-4281-b951-d872f2087c98
97 files changed, 400 insertions, 283 deletions
diff --git a/android_webview/tools/third_party_files_whitelist.txt b/android_webview/tools/third_party_files_whitelist.txt index 190bcb6..bc5ad88 100644 --- a/android_webview/tools/third_party_files_whitelist.txt +++ b/android_webview/tools/third_party_files_whitelist.txt @@ -186,13 +186,13 @@ webkit/browser/appcache/manifest_parser.cc # code is taken from WebKit, the license for which we already pick up from # webkit/. webkit/browser/appcache/manifest_parser.h -# Copyright The Chromium Authors and Netscape Communications Corporation; BSD -# and (MPL, GPL v2 or LGPL v2) licenses. This third-party code is taken from -# Mozilla, the license for which we already pick up from third_party/npapi/. -webkit/child/multipart_response_delegate.h # Copyright Tim Copperfield and Christian Dywan; LGPL license. Not used on # Android. webkit/common/cursors/webcursor_gtk_data.h +# Copyright The Chromium Authors and Netscape Communications Corporation; BSD +# and (MPL, GPL v2 or LGPL v2) licenses. This third-party code is taken from +# Mozilla, the license for which we already pick up from third_party/npapi/. +webkit/glue/multipart_response_delegate.h # This third-party code is taken from Mozilla, but is copyright Google and has # been re-licensed under the Chromium license. webkit/support/webkit_support_gfx.cc diff --git a/chrome/browser/captive_portal/captive_portal_tab_helper.h b/chrome/browser/captive_portal/captive_portal_tab_helper.h index dec16d2..88cf5ef 100644 --- a/chrome/browser/captive_portal/captive_portal_tab_helper.h +++ b/chrome/browser/captive_portal/captive_portal_tab_helper.h @@ -14,7 +14,7 @@ #include "content/public/browser/notification_registrar.h" #include "content/public/browser/web_contents_observer.h" #include "content/public/browser/web_contents_user_data.h" -#include "webkit/common/resource_type.h" +#include "webkit/glue/resource_type.h" class GURL; class Profile; diff --git a/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.h b/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.h index f4c8f75..c79d482 100644 --- a/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.h +++ b/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.h @@ -13,7 +13,7 @@ #include "base/memory/scoped_ptr.h" #include "chrome/browser/extensions/api/declarative_webrequest/request_stage.h" #include "chrome/common/extensions/api/events.h" -#include "webkit/common/resource_type.h" +#include "webkit/glue/resource_type.h" namespace base { class Value; diff --git a/chrome/browser/extensions/api/web_navigation/web_navigation_apitest.cc b/chrome/browser/extensions/api/web_navigation/web_navigation_apitest.cc index e62f3f9..f63ffd6 100644 --- a/chrome/browser/extensions/api/web_navigation/web_navigation_apitest.cc +++ b/chrome/browser/extensions/api/web_navigation/web_navigation_apitest.cc @@ -40,7 +40,7 @@ #include "net/test/embedded_test_server/embedded_test_server.h" #include "third_party/WebKit/public/web/WebContextMenuData.h" #include "third_party/WebKit/public/web/WebInputEvent.h" -#include "webkit/common/resource_type.h" +#include "webkit/glue/resource_type.h" using content::WebContents; diff --git a/chrome/browser/extensions/api/web_request/web_request_api.h b/chrome/browser/extensions/api/web_request/web_request_api.h index e0339fc..4e9ea49 100644 --- a/chrome/browser/extensions/api/web_request/web_request_api.h +++ b/chrome/browser/extensions/api/web_request/web_request_api.h @@ -25,7 +25,7 @@ #include "net/base/completion_callback.h" #include "net/base/network_delegate.h" #include "net/http/http_request_headers.h" -#include "webkit/common/resource_type.h" +#include "webkit/glue/resource_type.h" class ExtensionInfoMap; class ExtensionWebRequestTimeTracker; diff --git a/chrome/browser/extensions/api/web_request/web_request_api_helpers.h b/chrome/browser/extensions/api/web_request/web_request_api_helpers.h index 90b2f84..9b849c1 100644 --- a/chrome/browser/extensions/api/web_request/web_request_api_helpers.h +++ b/chrome/browser/extensions/api/web_request/web_request_api_helpers.h @@ -20,7 +20,7 @@ #include "net/http/http_request_headers.h" #include "net/http/http_response_headers.h" #include "url/gurl.h" -#include "webkit/common/resource_type.h" +#include "webkit/glue/resource_type.h" namespace base { class ListValue; diff --git a/chrome/browser/extensions/extension_function_dispatcher.cc b/chrome/browser/extensions/extension_function_dispatcher.cc index 47241e9..a8a0108 100644 --- a/chrome/browser/extensions/extension_function_dispatcher.cc +++ b/chrome/browser/extensions/extension_function_dispatcher.cc @@ -36,7 +36,7 @@ #include "content/public/common/result_codes.h" #include "ipc/ipc_message.h" #include "ipc/ipc_message_macros.h" -#include "webkit/common/resource_type.h" +#include "webkit/glue/resource_type.h" using extensions::Extension; using extensions::ExtensionAPI; diff --git a/chrome/browser/extensions/user_script_listener.h b/chrome/browser/extensions/user_script_listener.h index 009a9d74..d4f6c4a 100644 --- a/chrome/browser/extensions/user_script_listener.h +++ b/chrome/browser/extensions/user_script_listener.h @@ -15,7 +15,7 @@ #include "content/public/browser/browser_thread.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" -#include "webkit/common/resource_type.h" +#include "webkit/glue/resource_type.h" class GURL; class URLPattern; diff --git a/chrome/browser/net/resource_prefetch_predictor_observer.h b/chrome/browser/net/resource_prefetch_predictor_observer.h index 3790f0a..5ffb27b 100644 --- a/chrome/browser/net/resource_prefetch_predictor_observer.h +++ b/chrome/browser/net/resource_prefetch_predictor_observer.h @@ -8,7 +8,7 @@ #include "base/basictypes.h" #include "base/memory/weak_ptr.h" #include "chrome/browser/predictors/resource_prefetch_predictor.h" -#include "webkit/common/resource_type.h" +#include "webkit/glue/resource_type.h" namespace net { class URLRequest; diff --git a/chrome/browser/predictors/resource_prefetch_predictor.h b/chrome/browser/predictors/resource_prefetch_predictor.h index ed177e4..3776241 100644 --- a/chrome/browser/predictors/resource_prefetch_predictor.h +++ b/chrome/browser/predictors/resource_prefetch_predictor.h @@ -23,7 +23,7 @@ #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" #include "url/gurl.h" -#include "webkit/common/resource_type.h" +#include "webkit/glue/resource_type.h" class PredictorsHandler; class Profile; diff --git a/chrome/browser/predictors/resource_prefetch_predictor_tables.h b/chrome/browser/predictors/resource_prefetch_predictor_tables.h index 6995388..f8a965e 100644 --- a/chrome/browser/predictors/resource_prefetch_predictor_tables.h +++ b/chrome/browser/predictors/resource_prefetch_predictor_tables.h @@ -14,7 +14,7 @@ #include "chrome/browser/predictors/predictor_table_base.h" #include "chrome/browser/predictors/resource_prefetch_common.h" #include "url/gurl.h" -#include "webkit/common/resource_type.h" +#include "webkit/glue/resource_type.h" namespace sql { class Statement; diff --git a/chrome/browser/ui/webui/predictors/predictors_handler.cc b/chrome/browser/ui/webui/predictors/predictors_handler.cc index 3536ac9..14c88cf 100644 --- a/chrome/browser/ui/webui/predictors/predictors_handler.cc +++ b/chrome/browser/ui/webui/predictors/predictors_handler.cc @@ -13,7 +13,7 @@ #include "chrome/browser/predictors/resource_prefetch_predictor_tables.h" #include "chrome/browser/profiles/profile.h" #include "content/public/browser/web_ui.h" -#include "webkit/common/resource_type.h" +#include "webkit/glue/resource_type.h" using predictors::AutocompleteActionPredictor; using predictors::ResourcePrefetchPredictor; diff --git a/chrome/chrome_renderer.gypi b/chrome/chrome_renderer.gypi index fa6d12d..261a81a 100644 --- a/chrome/chrome_renderer.gypi +++ b/chrome/chrome_renderer.gypi @@ -19,15 +19,14 @@ '../net/net.gyp:net', '../printing/printing.gyp:printing', '../skia/skia.gyp:skia', - '../third_party/WebKit/public/blink.gyp:blink', '../third_party/hunspell/hunspell.gyp:hunspell', '../third_party/icu/icu.gyp:icui18n', '../third_party/icu/icu.gyp:icuuc', '../third_party/npapi/npapi.gyp:npapi', '../third_party/re2/re2.gyp:re2', + '../third_party/WebKit/public/blink.gyp:blink', '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h', '../ui/surface/surface.gyp:surface', - '../webkit/support/webkit_support.gyp:glue_child', '../webkit/glue/webkit_glue_common.gyp:glue_common', '../webkit/renderer/webkit_renderer.gyp:webkit_renderer', '../webkit/support/webkit_support.gyp:glue', diff --git a/chrome/common/automation_messages.h b/chrome/common/automation_messages.h index c01b93a..20b8925 100644 --- a/chrome/common/automation_messages.h +++ b/chrome/common/automation_messages.h @@ -145,7 +145,7 @@ IPC_STRUCT_BEGIN(AutomationURLRequest) IPC_STRUCT_MEMBER(std::string, referrer) IPC_STRUCT_MEMBER(std::string, extra_request_headers) IPC_STRUCT_MEMBER(scoped_refptr<net::UploadData>, upload_data) - IPC_STRUCT_MEMBER(int, resource_type) // see webkit/common/resource_type.h + IPC_STRUCT_MEMBER(int, resource_type) // see webkit/glue/resource_type.h IPC_STRUCT_MEMBER(int, load_flags) // see net/base/load_flags.h IPC_STRUCT_END() diff --git a/chrome/renderer/DEPS b/chrome/renderer/DEPS index 41e8310..c8ec078 100644 --- a/chrome/renderer/DEPS +++ b/chrome/renderer/DEPS @@ -2,7 +2,6 @@ include_rules = [ "+components/autofill/content/renderer", "+components/autofill/core/common", "+components/visitedlink/renderer", - "+content/public/child", "+content/public/renderer", "+extensions/common", "+grit", # For generated headers @@ -14,7 +13,6 @@ include_rules = [ "+sandbox/win/src", "+skia", - "+webkit/child", "+webkit/common", "+webkit/glue", "+webkit/glue/plugins", diff --git a/chrome/renderer/chrome_render_process_observer.cc b/chrome/renderer/chrome_render_process_observer.cc index f4a5f8b..e213149 100644 --- a/chrome/renderer/chrome_render_process_observer.cc +++ b/chrome/renderer/chrome_render_process_observer.cc @@ -33,7 +33,7 @@ #include "chrome/renderer/content_settings_observer.h" #include "chrome/renderer/extensions/extension_localization_peer.h" #include "chrome/renderer/security_filter_peer.h" -#include "content/public/child/resource_dispatcher_delegate.h" +#include "content/public/common/resource_dispatcher_delegate.h" #include "content/public/renderer/render_thread.h" #include "content/public/renderer/render_view.h" #include "content/public/renderer/render_view_visitor.h" @@ -41,6 +41,7 @@ #include "media/base/media_switches.h" #include "net/base/net_errors.h" #include "net/base/net_module.h" +#include "third_party/sqlite/sqlite3.h" #include "third_party/WebKit/public/web/WebCache.h" #include "third_party/WebKit/public/web/WebCrossOriginPreflightResultCache.h" #include "third_party/WebKit/public/web/WebDocument.h" @@ -49,7 +50,6 @@ #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" #include "third_party/WebKit/public/web/WebSecurityPolicy.h" #include "third_party/WebKit/public/web/WebView.h" -#include "third_party/sqlite/sqlite3.h" #include "v8/include/v8.h" #if defined(OS_WIN) diff --git a/chrome/renderer/content_settings_observer.cc b/chrome/renderer/content_settings_observer.cc index fb8ddf8..b36149a 100644 --- a/chrome/renderer/content_settings_observer.cc +++ b/chrome/renderer/content_settings_observer.cc @@ -19,7 +19,7 @@ #include "third_party/WebKit/public/web/WebFrameClient.h" #include "third_party/WebKit/public/web/WebSecurityOrigin.h" #include "third_party/WebKit/public/web/WebView.h" -#include "webkit/child/weburlresponse_extradata_impl.h" +#include "webkit/glue/weburlresponse_extradata_impl.h" using WebKit::WebDataSource; using WebKit::WebFrame; diff --git a/chrome/renderer/extensions/extension_localization_peer.h b/chrome/renderer/extensions/extension_localization_peer.h index 3245d440..531fd6b 100644 --- a/chrome/renderer/extensions/extension_localization_peer.h +++ b/chrome/renderer/extensions/extension_localization_peer.h @@ -8,7 +8,7 @@ #include <string> #include "ipc/ipc_sender.h" -#include "webkit/child/resource_loader_bridge.h" +#include "webkit/glue/resource_loader_bridge.h" // The ExtensionLocalizationPeer is a proxy to a // webkit_glue::ResourceLoaderBridge::Peer instance. It is used to pre-process diff --git a/chrome/renderer/extensions/extension_localization_peer_unittest.cc b/chrome/renderer/extensions/extension_localization_peer_unittest.cc index f56f924..dd16705 100644 --- a/chrome/renderer/extensions/extension_localization_peer_unittest.cc +++ b/chrome/renderer/extensions/extension_localization_peer_unittest.cc @@ -14,7 +14,7 @@ #include "net/url_request/url_request_status.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" -#include "webkit/child/resource_loader_bridge.h" +#include "webkit/glue/resource_loader_bridge.h" using testing::_; using testing::DoAll; diff --git a/chrome/renderer/security_filter_peer.h b/chrome/renderer/security_filter_peer.h index ddc9e64..b4dd637 100644 --- a/chrome/renderer/security_filter_peer.h +++ b/chrome/renderer/security_filter_peer.h @@ -5,7 +5,7 @@ #ifndef CHROME_RENDERER_SECURITY_FILTER_PEER_H_ #define CHROME_RENDERER_SECURITY_FILTER_PEER_H_ -#include "webkit/child/resource_loader_bridge.h" +#include "webkit/glue/resource_loader_bridge.h" // The SecurityFilterPeer is a proxy to a // webkit_glue::ResourceLoaderBridge::Peer instance. It is used to pre-process diff --git a/chrome_frame/plugin_url_request.h b/chrome_frame/plugin_url_request.h index acfc49d..718741b 100644 --- a/chrome_frame/plugin_url_request.h +++ b/chrome_frame/plugin_url_request.h @@ -17,7 +17,7 @@ #include "net/base/host_port_pair.h" #include "net/base/upload_data.h" #include "net/url_request/url_request_status.h" -#include "webkit/common/resource_type.h" +#include "webkit/glue/resource_type.h" class PluginUrlRequest; class PluginUrlRequestDelegate; diff --git a/content/browser/browser_plugin/browser_plugin_guest.cc b/content/browser/browser_plugin/browser_plugin_guest.cc index 8571a7c..6dbf2df 100644 --- a/content/browser/browser_plugin/browser_plugin_guest.cc +++ b/content/browser/browser_plugin/browser_plugin_guest.cc @@ -46,7 +46,7 @@ #include "third_party/WebKit/public/web/WebCursorInfo.h" #include "ui/base/keycodes/keyboard_codes.h" #include "ui/surface/transport_dib.h" -#include "webkit/common/resource_type.h" +#include "webkit/glue/resource_type.h" #if defined(OS_MACOSX) #include "content/browser/browser_plugin/browser_plugin_popup_menu_helper_mac.h" diff --git a/content/browser/child_process_security_policy_impl.h b/content/browser/child_process_security_policy_impl.h index 713ef59..acf74cd 100644 --- a/content/browser/child_process_security_policy_impl.h +++ b/content/browser/child_process_security_policy_impl.h @@ -16,7 +16,7 @@ #include "base/synchronization/lock.h" #include "content/public/browser/child_process_security_policy.h" #include "webkit/common/fileapi/file_system_types.h" -#include "webkit/common/resource_type.h" +#include "webkit/glue/resource_type.h" class GURL; diff --git a/content/browser/loader/offline_policy_unittest.cc b/content/browser/loader/offline_policy_unittest.cc index 40243c8..18c09df 100644 --- a/content/browser/loader/offline_policy_unittest.cc +++ b/content/browser/loader/offline_policy_unittest.cc @@ -9,7 +9,7 @@ #include "net/base/load_flags.h" #include "net/http/http_response_info.h" #include "testing/gtest/include/gtest/gtest.h" -#include "webkit/common/resource_type.h" +#include "webkit/glue/resource_type.h" namespace content { diff --git a/content/browser/loader/resource_dispatcher_host_impl.h b/content/browser/loader/resource_dispatcher_host_impl.h index 71253fa..54e47e4 100644 --- a/content/browser/loader/resource_dispatcher_host_impl.h +++ b/content/browser/loader/resource_dispatcher_host_impl.h @@ -41,7 +41,7 @@ #include "ipc/ipc_message.h" #include "net/cookies/canonical_cookie.h" #include "net/url_request/url_request.h" -#include "webkit/common/resource_type.h" +#include "webkit/glue/resource_type.h" class ResourceHandler; struct ResourceHostMsg_Request; diff --git a/content/browser/loader/resource_message_filter.h b/content/browser/loader/resource_message_filter.h index 2c56af0..0ea5771 100644 --- a/content/browser/loader/resource_message_filter.h +++ b/content/browser/loader/resource_message_filter.h @@ -8,7 +8,7 @@ #include "base/memory/scoped_ptr.h" #include "content/common/content_export.h" #include "content/public/browser/browser_message_filter.h" -#include "webkit/common/resource_type.h" +#include "webkit/glue/resource_type.h" namespace fileapi { class FileSystemContext; diff --git a/content/browser/loader/resource_request_info_impl.h b/content/browser/loader/resource_request_info_impl.h index d9958653..1c663257 100644 --- a/content/browser/loader/resource_request_info_impl.h +++ b/content/browser/loader/resource_request_info_impl.h @@ -14,7 +14,7 @@ #include "content/public/browser/resource_request_info.h" #include "content/public/common/referrer.h" #include "net/base/load_states.h" -#include "webkit/common/resource_type.h" +#include "webkit/glue/resource_type.h" namespace webkit_blob { class BlobData; diff --git a/content/browser/loader/resource_scheduler_unittest.cc b/content/browser/loader/resource_scheduler_unittest.cc index 2066294..c28e2ff 100644 --- a/content/browser/loader/resource_scheduler_unittest.cc +++ b/content/browser/loader/resource_scheduler_unittest.cc @@ -21,7 +21,7 @@ #include "net/url_request/url_request.h" #include "net/url_request/url_request_test_util.h" #include "testing/gtest/include/gtest/gtest.h" -#include "webkit/common/resource_type.h" +#include "webkit/glue/resource_type.h" namespace content { diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc index 157afe4..931e47d 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc @@ -130,7 +130,7 @@ #include "ui/base/ui_base_switches.h" #include "ui/gl/gl_switches.h" #include "webkit/browser/fileapi/sandbox_file_system_backend.h" -#include "webkit/common/resource_type.h" +#include "webkit/glue/resource_type.h" #include "webkit/plugins/plugin_switches.h" #if defined(OS_ANDROID) diff --git a/content/browser/ssl/ssl_error_handler.h b/content/browser/ssl/ssl_error_handler.h index 5f9e9e5..e7345e2 100644 --- a/content/browser/ssl/ssl_error_handler.h +++ b/content/browser/ssl/ssl_error_handler.h @@ -13,7 +13,7 @@ #include "content/common/content_export.h" #include "content/public/browser/global_request_id.h" #include "url/gurl.h" -#include "webkit/common/resource_type.h" +#include "webkit/glue/resource_type.h" namespace net { class SSLInfo; diff --git a/content/browser/ssl/ssl_policy.cc b/content/browser/ssl/ssl_policy.cc index 28c679b..5430070 100644 --- a/content/browser/ssl/ssl_policy.cc +++ b/content/browser/ssl/ssl_policy.cc @@ -21,7 +21,7 @@ #include "content/public/common/ssl_status.h" #include "content/public/common/url_constants.h" #include "net/ssl/ssl_info.h" -#include "webkit/common/resource_type.h" +#include "webkit/glue/resource_type.h" namespace { diff --git a/content/browser/ssl/ssl_policy.h b/content/browser/ssl/ssl_policy.h index c88e10c..7d5d361 100644 --- a/content/browser/ssl/ssl_policy.h +++ b/content/browser/ssl/ssl_policy.h @@ -8,7 +8,7 @@ #include <string> #include "base/memory/ref_counted.h" -#include "webkit/common/resource_type.h" +#include "webkit/glue/resource_type.h" namespace content { class NavigationEntryImpl; diff --git a/content/browser/ssl/ssl_request_info.h b/content/browser/ssl/ssl_request_info.h index cf745fe..7f27b4b 100644 --- a/content/browser/ssl/ssl_request_info.h +++ b/content/browser/ssl/ssl_request_info.h @@ -10,7 +10,7 @@ #include "base/memory/ref_counted.h" #include "net/cert/cert_status_flags.h" #include "url/gurl.h" -#include "webkit/common/resource_type.h" +#include "webkit/glue/resource_type.h" namespace content { diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h index 81fbdf3..5486eba 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h @@ -31,7 +31,7 @@ #include "ui/gfx/rect_f.h" #include "ui/gfx/size.h" #include "ui/gfx/vector2d.h" -#include "webkit/common/resource_type.h" +#include "webkit/glue/resource_type.h" struct BrowserPluginHostMsg_ResizeGuest_Params; struct ViewHostMsg_DateTimeDialogValue_Params; diff --git a/content/browser/worker_host/worker_process_host.cc b/content/browser/worker_host/worker_process_host.cc index 9f57bcc..b0e32c8 100644 --- a/content/browser/worker_host/worker_process_host.cc +++ b/content/browser/worker_host/worker_process_host.cc @@ -50,7 +50,7 @@ #include "ui/base/ui_base_switches.h" #include "webkit/browser/fileapi/file_system_context.h" #include "webkit/browser/fileapi/sandbox_file_system_backend.h" -#include "webkit/common/resource_type.h" +#include "webkit/glue/resource_type.h" #if defined(OS_WIN) #include "content/common/sandbox_win.h" diff --git a/content/child/child_thread.h b/content/child/child_thread.h index aa04e2e..77f7bdf 100644 --- a/content/child/child_thread.h +++ b/content/child/child_thread.h @@ -13,7 +13,7 @@ #include "content/common/content_export.h" #include "content/common/message_router.h" #include "ipc/ipc_message.h" // For IPC_MESSAGE_LOG_ENABLED. -#include "webkit/child/resource_loader_bridge.h" +#include "webkit/glue/resource_loader_bridge.h" namespace base { class MessageLoop; diff --git a/content/child/database_util.h b/content/child/database_util.h index 8b85623..75bcd20 100644 --- a/content/child/database_util.h +++ b/content/child/database_util.h @@ -5,7 +5,7 @@ #ifndef CONTENT_CHILD_DATABASE_UTIL_H_ #define CONTENT_CHILD_DATABASE_UTIL_H_ -#include "webkit/child/webkitplatformsupport_impl.h" +#include "webkit/glue/webkitplatformsupport_impl.h" namespace IPC { class SyncMessageFilter; diff --git a/content/child/request_extra_data.h b/content/child/request_extra_data.h index 3cbc7fa..5b890e6 100644 --- a/content/child/request_extra_data.h +++ b/content/child/request_extra_data.h @@ -8,7 +8,7 @@ #include "base/compiler_specific.h" #include "content/common/content_export.h" #include "content/public/common/page_transition_types.h" -#include "webkit/child/weburlrequest_extradata_impl.h" +#include "webkit/glue/weburlrequest_extradata_impl.h" namespace content { diff --git a/content/child/resource_dispatcher.cc b/content/child/resource_dispatcher.cc index 424902f..9bf8a10 100644 --- a/content/child/resource_dispatcher.cc +++ b/content/child/resource_dispatcher.cc @@ -18,13 +18,13 @@ #include "content/child/request_extra_data.h" #include "content/common/inter_process_time_ticks_converter.h" #include "content/common/resource_messages.h" -#include "content/public/child/resource_dispatcher_delegate.h" +#include "content/public/common/resource_dispatcher_delegate.h" #include "content/public/common/resource_response.h" #include "net/base/net_errors.h" #include "net/base/net_util.h" #include "net/base/request_priority.h" #include "net/http/http_response_headers.h" -#include "webkit/common/resource_type.h" +#include "webkit/glue/resource_type.h" using webkit_glue::ResourceLoaderBridge; using webkit_glue::ResourceRequestBody; diff --git a/content/child/resource_dispatcher.h b/content/child/resource_dispatcher.h index 66416f4..9b26602 100644 --- a/content/child/resource_dispatcher.h +++ b/content/child/resource_dispatcher.h @@ -18,7 +18,7 @@ #include "content/common/content_export.h" #include "ipc/ipc_listener.h" #include "ipc/ipc_sender.h" -#include "webkit/child/resource_loader_bridge.h" +#include "webkit/glue/resource_loader_bridge.h" namespace content { class ResourceDispatcherDelegate; diff --git a/content/child/socket_stream_dispatcher.cc b/content/child/socket_stream_dispatcher.cc index 9997f35..8dc4569 100644 --- a/content/child/socket_stream_dispatcher.cc +++ b/content/child/socket_stream_dispatcher.cc @@ -19,8 +19,8 @@ #include "content/common/socket_stream_messages.h" #include "net/base/net_errors.h" #include "url/gurl.h" -#include "webkit/child/websocketstreamhandle_delegate.h" #include "webkit/glue/websocketstreamhandle_bridge.h" +#include "webkit/glue/websocketstreamhandle_delegate.h" namespace content { diff --git a/content/common/DEPS b/content/common/DEPS index afff5e3..9f9a62f 100644 --- a/content/common/DEPS +++ b/content/common/DEPS @@ -6,9 +6,6 @@ include_rules = [ "-webkit/child", "-webkit/renderer", - # TODO(ananta|jamesr|scottmg) http://crbug.com/237249 - "!webkit/child/websocketstreamhandle_impl.h", - # No inclusion of WebKit from the browser, other than strictly enum/POD, # header-only types, and some selected common code. "-third_party/WebKit", diff --git a/content/common/content_param_traits_macros.h b/content/common/content_param_traits_macros.h index b99a331..e7d42ab 100644 --- a/content/common/content_param_traits_macros.h +++ b/content/common/content_param_traits_macros.h @@ -12,7 +12,7 @@ #include "ipc/ipc_message_macros.h" #include "third_party/WebKit/public/web/WebInputEvent.h" #include "ui/base/latency_info.h" -#include "webkit/common/resource_type.h" +#include "webkit/glue/resource_type.h" #undef IPC_MESSAGE_EXPORT #define IPC_MESSAGE_EXPORT CONTENT_EXPORT diff --git a/content/common/resource_messages.cc b/content/common/resource_messages.cc index 0bfaa07..3efc61f 100644 --- a/content/common/resource_messages.cc +++ b/content/common/resource_messages.cc @@ -6,6 +6,7 @@ #include "net/base/load_timing_info.h" #include "net/http/http_response_headers.h" +#include "webkit/glue/resource_loader_bridge.h" namespace IPC { diff --git a/content/common/socket_stream_handle_data.cc b/content/common/socket_stream_handle_data.cc index be419d7..b8090c7 100644 --- a/content/common/socket_stream_handle_data.cc +++ b/content/common/socket_stream_handle_data.cc @@ -4,7 +4,7 @@ #include "content/common/socket_stream_handle_data.h" -#include "webkit/child/websocketstreamhandle_impl.h" +#include "webkit/glue/websocketstreamhandle_impl.h" using webkit_glue::WebSocketStreamHandleImpl; using WebKit::WebSocketStreamHandle; diff --git a/content/content_child.gypi b/content/content_child.gypi index ffca557..7f789711 100644 --- a/content/content_child.gypi +++ b/content/content_child.gypi @@ -16,6 +16,7 @@ '../base/base.gyp:base', ], 'sources': [ + 'public/child/image_decoder_utils.h', 'child/android/child_jni_registrar.cc', 'child/android/child_jni_registrar.h', 'child/appcache_backend_proxy.cc', @@ -46,10 +47,10 @@ 'child/image_decoder.h', 'child/indexed_db/indexed_db_dispatcher.cc', 'child/indexed_db/indexed_db_dispatcher.h', - 'child/indexed_db/indexed_db_key_builders.cc', - 'child/indexed_db/indexed_db_key_builders.h', 'child/indexed_db/indexed_db_message_filter.cc', 'child/indexed_db/indexed_db_message_filter.h', + 'child/indexed_db/indexed_db_key_builders.cc', + 'child/indexed_db/indexed_db_key_builders.h', 'child/indexed_db/proxy_webidbcursor_impl.cc', 'child/indexed_db/proxy_webidbcursor_impl.h', 'child/indexed_db/proxy_webidbdatabase_impl.cc', @@ -61,12 +62,12 @@ 'child/npapi/npobject_base.h', 'child/npapi/npobject_proxy.cc', 'child/npapi/npobject_proxy.h', + 'child/npapi/npruntime_util.cc', + 'child/npapi/npruntime_util.h', 'child/npapi/npobject_stub.cc', 'child/npapi/npobject_stub.h', 'child/npapi/npobject_util.cc', 'child/npapi/npobject_util.h', - 'child/npapi/npruntime_util.cc', - 'child/npapi/npruntime_util.h', 'child/npapi/plugin_host.cc', 'child/npapi/plugin_host.h', 'child/npapi/plugin_instance.cc', @@ -113,16 +114,14 @@ 'child/socket_stream_dispatcher.h', 'child/thread_safe_sender.cc', 'child/thread_safe_sender.h', - 'child/web_database_observer_impl.cc', - 'child/web_database_observer_impl.h', 'child/webblobregistry_impl.cc', 'child/webblobregistry_impl.h', + 'child/web_database_observer_impl.cc', + 'child/web_database_observer_impl.h', 'child/webkitplatformsupport_impl.cc', 'child/webkitplatformsupport_impl.h', 'child/webmessageportchannel_impl.cc', 'child/webmessageportchannel_impl.h', - 'public/child/image_decoder_utils.h', - 'public/child/resource_dispatcher_delegate.h', ], 'conditions': [ ['OS=="android"', { diff --git a/content/content_common.gypi b/content/content_common.gypi index 77ba35b..50fbff2 100644 --- a/content/content_common.gypi +++ b/content/content_common.gypi @@ -73,6 +73,7 @@ 'public/common/referrer.h', 'public/common/renderer_preferences.cc', 'public/common/renderer_preferences.h', + 'public/common/resource_dispatcher_delegate.h', 'public/common/resource_response.h', 'public/common/result_codes.h', 'public/common/result_codes_list.h', diff --git a/content/content_tests.gypi b/content/content_tests.gypi index 9083289..92a88f7 100644 --- a/content/content_tests.gypi +++ b/content/content_tests.gypi @@ -518,7 +518,6 @@ '../webkit/browser/fileapi/transient_file_util_unittest.cc', '../webkit/browser/fileapi/upload_file_system_file_element_reader_unittest.cc', 'test/run_all_unittests.cc', - '../webkit/child/multipart_response_delegate_unittest.cc', '../webkit/child/touch_fling_gesture_curve_unittest.cc', '../webkit/child/worker_task_runner_unittest.cc', '../webkit/common/blob/shareable_file_reference_unittest.cc', @@ -527,6 +526,7 @@ '../webkit/common/database/database_identifier_unittest.cc', '../webkit/common/dom_storage/dom_storage_map_unittest.cc', '../webkit/common/fileapi/file_system_util_unittest.cc', + '../webkit/glue/multipart_response_delegate_unittest.cc', '../webkit/glue/webkit_glue_unittest.cc', '../webkit/mocks/mock_weburlloader.cc', '../webkit/mocks/mock_weburlloader.h', diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h index daadcb0..9cf7aaf 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h @@ -24,7 +24,7 @@ #include "net/cookies/canonical_cookie.h" #include "net/url_request/url_request_job_factory.h" #include "third_party/WebKit/public/web/WebNotificationPresenter.h" -#include "webkit/common/resource_type.h" +#include "webkit/glue/resource_type.h" #if defined(OS_POSIX) && !defined(OS_MACOSX) #include "base/posix/global_descriptors.h" diff --git a/content/public/browser/load_from_memory_cache_details.h b/content/public/browser/load_from_memory_cache_details.h index ac9b734..b826fe7 100644 --- a/content/public/browser/load_from_memory_cache_details.h +++ b/content/public/browser/load_from_memory_cache_details.h @@ -9,7 +9,7 @@ #include "base/basictypes.h" #include "net/cert/cert_status_flags.h" #include "url/gurl.h" -#include "webkit/common/resource_type.h" +#include "webkit/glue/resource_type.h" namespace content { diff --git a/content/public/browser/resource_dispatcher_host_delegate.h b/content/public/browser/resource_dispatcher_host_delegate.h index af56b73..1a6ddb8 100644 --- a/content/public/browser/resource_dispatcher_host_delegate.h +++ b/content/public/browser/resource_dispatcher_host_delegate.h @@ -10,7 +10,7 @@ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" #include "content/common/content_export.h" -#include "webkit/common/resource_type.h" +#include "webkit/glue/resource_type.h" class GURL; template <class T> class ScopedVector; diff --git a/content/public/browser/resource_request_details.h b/content/public/browser/resource_request_details.h index 1c20557..66c0eaf 100644 --- a/content/public/browser/resource_request_details.h +++ b/content/public/browser/resource_request_details.h @@ -11,7 +11,7 @@ #include "net/cert/cert_status_flags.h" #include "net/url_request/url_request_status.h" #include "url/gurl.h" -#include "webkit/common/resource_type.h" +#include "webkit/glue/resource_type.h" namespace net { class URLRequest; diff --git a/content/public/browser/resource_request_info.h b/content/public/browser/resource_request_info.h index 6952975..76dfc48 100644 --- a/content/public/browser/resource_request_info.h +++ b/content/public/browser/resource_request_info.h @@ -9,7 +9,7 @@ #include "content/common/content_export.h" #include "content/public/common/page_transition_types.h" #include "third_party/WebKit/public/platform/WebReferrerPolicy.h" -#include "webkit/common/resource_type.h" +#include "webkit/glue/resource_type.h" namespace net { class URLRequest; diff --git a/content/public/common/resource_dispatcher_delegate.h b/content/public/common/resource_dispatcher_delegate.h new file mode 100644 index 0000000..43d174a --- /dev/null +++ b/content/public/common/resource_dispatcher_delegate.h @@ -0,0 +1,32 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CONTENT_PUBLIC_COMMON_RESOURCE_DISPATCHER_DELEGATE_H_ +#define CONTENT_PUBLIC_COMMON_RESOURCE_DISPATCHER_DELEGATE_H_ + +#include "content/common/content_export.h" +#include "webkit/glue/resource_loader_bridge.h" + +namespace content { + +// Interface that allows observing request events and optionally replacing the +// peer. +class CONTENT_EXPORT ResourceDispatcherDelegate { + public: + virtual ~ResourceDispatcherDelegate() {} + + virtual webkit_glue::ResourceLoaderBridge::Peer* OnRequestComplete( + webkit_glue::ResourceLoaderBridge::Peer* current_peer, + ResourceType::Type resource_type, + int error_code) = 0; + + virtual webkit_glue::ResourceLoaderBridge::Peer* OnReceivedResponse( + webkit_glue::ResourceLoaderBridge::Peer* current_peer, + const std::string& mime_type, + const GURL& url) = 0; +}; + +} // namespace content + +#endif // CONTENT_PUBLIC_COMMON_RESOURCE_DISPATCHER_DELEGATE_H_ diff --git a/content/public/common/resource_response.h b/content/public/common/resource_response.h index 829a1ea..6e7cec2 100644 --- a/content/public/common/resource_response.h +++ b/content/public/common/resource_response.h @@ -14,7 +14,7 @@ #include "content/common/content_export.h" #include "net/url_request/url_request_status.h" #include "url/gurl.h" -#include "webkit/common/resource_response_info.h" +#include "webkit/glue/resource_loader_bridge.h" namespace content { diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc index 3d5d7f8..288b405 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc @@ -139,22 +139,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/WebKit/public/platform/WebCString.h" -#include "third_party/WebKit/public/platform/WebDragData.h" -#include "third_party/WebKit/public/platform/WebFileSystemType.h" -#include "third_party/WebKit/public/platform/WebHTTPBody.h" -#include "third_party/WebKit/public/platform/WebImage.h" -#include "third_party/WebKit/public/platform/WebMessagePortChannel.h" -#include "third_party/WebKit/public/platform/WebPoint.h" -#include "third_party/WebKit/public/platform/WebRect.h" -#include "third_party/WebKit/public/platform/WebSize.h" -#include "third_party/WebKit/public/platform/WebSocketStreamHandle.h" -#include "third_party/WebKit/public/platform/WebString.h" -#include "third_party/WebKit/public/platform/WebURL.h" -#include "third_party/WebKit/public/platform/WebURLError.h" -#include "third_party/WebKit/public/platform/WebURLRequest.h" -#include "third_party/WebKit/public/platform/WebURLResponse.h" -#include "third_party/WebKit/public/platform/WebVector.h" #include "third_party/WebKit/public/web/WebAccessibilityObject.h" #include "third_party/WebKit/public/web/WebColorName.h" #include "third_party/WebKit/public/web/WebDOMEvent.h" @@ -197,6 +181,22 @@ #include "third_party/WebKit/public/web/WebView.h" #include "third_party/WebKit/public/web/WebWindowFeatures.h" #include "third_party/WebKit/public/web/default/WebRenderTheme.h" +#include "third_party/WebKit/public/platform/WebCString.h" +#include "third_party/WebKit/public/platform/WebDragData.h" +#include "third_party/WebKit/public/platform/WebFileSystemType.h" +#include "third_party/WebKit/public/platform/WebHTTPBody.h" +#include "third_party/WebKit/public/platform/WebImage.h" +#include "third_party/WebKit/public/platform/WebMessagePortChannel.h" +#include "third_party/WebKit/public/platform/WebPoint.h" +#include "third_party/WebKit/public/platform/WebRect.h" +#include "third_party/WebKit/public/platform/WebSize.h" +#include "third_party/WebKit/public/platform/WebSocketStreamHandle.h" +#include "third_party/WebKit/public/platform/WebString.h" +#include "third_party/WebKit/public/platform/WebURL.h" +#include "third_party/WebKit/public/platform/WebURLError.h" +#include "third_party/WebKit/public/platform/WebURLRequest.h" +#include "third_party/WebKit/public/platform/WebURLResponse.h" +#include "third_party/WebKit/public/platform/WebVector.h" #include "ui/base/ui_base_switches_util.h" #include "ui/gfx/native_widget_types.h" #include "ui/gfx/point.h" @@ -205,9 +205,9 @@ #include "ui/gfx/size_conversions.h" #include "ui/shell_dialogs/selected_file_info.h" #include "v8/include/v8.h" -#include "webkit/child/weburlresponse_extradata_impl.h" #include "webkit/common/dom_storage/dom_storage_types.h" #include "webkit/glue/webkit_glue.h" +#include "webkit/glue/weburlresponse_extradata_impl.h" #include "webkit/renderer/appcache/web_application_cache_host_impl.h" #include "webkit/renderer/webpreferences_renderer.h" @@ -225,9 +225,9 @@ #include "content/renderer/media/android/webmediaplayer_android.h" #include "content/renderer/media/android/webmediaplayer_proxy_android.h" #include "skia/ext/platform_canvas.h" +#include "third_party/WebKit/public/web/WebHitTestResult.h" #include "third_party/WebKit/public/platform/WebFloatPoint.h" #include "third_party/WebKit/public/platform/WebFloatRect.h" -#include "third_party/WebKit/public/web/WebHitTestResult.h" #include "ui/gfx/rect_f.h" #if defined(GOOGLE_TV) diff --git a/content/renderer/renderer_main.cc b/content/renderer/renderer_main.cc index 0fd87e3..ddc8060 100644 --- a/content/renderer/renderer_main.cc +++ b/content/renderer/renderer_main.cc @@ -33,7 +33,6 @@ #include "content/renderer/render_thread_impl.h" #include "content/renderer/renderer_main_platform_delegate.h" #include "ui/base/ui_base_switches.h" -#include "webkit/child/webkit_child_helpers.h" #include "webkit/glue/webkit_glue.h" #include "webkit/plugins/ppapi/ppapi_interface_factory.h" diff --git a/content/renderer/webplugin_impl.cc b/content/renderer/webplugin_impl.cc index 9c9b0b0..6112fa4 100644 --- a/content/renderer/webplugin_impl.cc +++ b/content/renderer/webplugin_impl.cc @@ -48,7 +48,7 @@ #include "ui/gfx/rect.h" #include "url/gurl.h" #include "url/url_util.h" -#include "webkit/child/multipart_response_delegate.h" +#include "webkit/glue/multipart_response_delegate.h" #include "webkit/plugins/plugin_constants.h" #include "webkit/renderer/appcache/web_application_cache_host_impl.h" #include "webkit/renderer/compositor_bindings/web_layer_impl.h" diff --git a/webkit/browser/appcache/appcache_host.h b/webkit/browser/appcache/appcache_host.h index 4242bc1..fdc97d0 100644 --- a/webkit/browser/appcache/appcache_host.h +++ b/webkit/browser/appcache/appcache_host.h @@ -15,7 +15,7 @@ #include "webkit/browser/appcache/appcache_storage.h" #include "webkit/browser/webkit_storage_browser_export.h" #include "webkit/common/appcache/appcache_interfaces.h" -#include "webkit/common/resource_type.h" +#include "webkit/glue/resource_type.h" namespace net { class URLRequest; diff --git a/webkit/browser/appcache/appcache_interceptor.h b/webkit/browser/appcache/appcache_interceptor.h index b1db1c0..10ae84d 100644 --- a/webkit/browser/appcache/appcache_interceptor.h +++ b/webkit/browser/appcache/appcache_interceptor.h @@ -9,7 +9,7 @@ #include "net/url_request/url_request.h" #include "url/gurl.h" #include "webkit/browser/webkit_storage_browser_export.h" -#include "webkit/common/resource_type.h" +#include "webkit/glue/resource_type.h" namespace appcache { diff --git a/webkit/browser/appcache/appcache_request_handler.h b/webkit/browser/appcache/appcache_request_handler.h index 606d6cf..1b7753c 100644 --- a/webkit/browser/appcache/appcache_request_handler.h +++ b/webkit/browser/appcache/appcache_request_handler.h @@ -10,7 +10,7 @@ #include "webkit/browser/appcache/appcache_entry.h" #include "webkit/browser/appcache/appcache_host.h" #include "webkit/browser/webkit_storage_browser_export.h" -#include "webkit/common/resource_type.h" +#include "webkit/glue/resource_type.h" namespace net { class NetworkDelegate; diff --git a/webkit/child/DEPS b/webkit/child/DEPS index 64d1c38..552b168 100644 --- a/webkit/child/DEPS +++ b/webkit/child/DEPS @@ -1,6 +1,5 @@ -include_rules = [ - "+content/public/common", - "+jni", # Needed for Android's java-generated bindings. - "+ui/base", - "+ui/native_theme", -] +include_rules = [
+ "+jni", # Needed for Android's java-generated bindings.
+ "+ui/base",
+ "+ui/native_theme",
+]
diff --git a/webkit/child/webkit_child_helpers.cc b/webkit/child/webkit_child_helpers.cc deleted file mode 100644 index 6777955..0000000 --- a/webkit/child/webkit_child_helpers.cc +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2013 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "webkit/child/webkit_child_helpers.h" - -#if defined(OS_LINUX) -#include <malloc.h> -#endif - -#include "base/logging.h" -#include "base/memory/scoped_ptr.h" -#include "base/process_util.h" -#include "v8/include/v8.h" - -namespace webkit_glue { - -#if defined(OS_LINUX) || defined(OS_ANDROID) -size_t MemoryUsageKB() { - struct mallinfo minfo = mallinfo(); - uint64_t mem_usage = -#if defined(USE_TCMALLOC) - minfo.uordblks -#else - (minfo.hblkhd + minfo.arena) -#endif - >> 10; - - v8::HeapStatistics stat; - // TODO(svenpanne) The call below doesn't take web workers into account, this - // has to be done manually by iterating over all Isolates involved. - v8::Isolate::GetCurrent()->GetHeapStatistics(&stat); - return mem_usage + (static_cast<uint64_t>(stat.total_heap_size()) >> 10); -} -#elif defined(OS_MACOSX) -size_t MemoryUsageKB() { - scoped_ptr<base::ProcessMetrics> process_metrics( - // The default port provider is sufficient to get data for the current - // process. - base::ProcessMetrics::CreateProcessMetrics( - base::GetCurrentProcessHandle(), NULL)); - return process_metrics->GetWorkingSetSize() >> 10; -} -#else -size_t MemoryUsageKB() { - scoped_ptr<base::ProcessMetrics> process_metrics( - base::ProcessMetrics::CreateProcessMetrics( - base::GetCurrentProcessHandle())); - return process_metrics->GetPagefileUsage() >> 10; -} -#endif - -} // webkit_glue diff --git a/webkit/child/webkit_child_helpers.h b/webkit/child/webkit_child_helpers.h deleted file mode 100644 index 3262fa2..0000000 --- a/webkit/child/webkit_child_helpers.h +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2013 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef WEBKIT_CHILD_WEBKIT_CHILD_HELPERS_H_ -#define WEBKIT_CHILD_WEBKIT_CHILD_HELPERS_H_ - -#include "base/basictypes.h" -#include "webkit/child/webkit_child_export.h" - -namespace webkit_glue { - -// Returns an estimate of the memory usage of the renderer process. Different -// platforms implement this function differently, and count in different -// allocations. Results are not comparable across platforms. The estimate is -// computed inside the sandbox and thus its not always accurate. -WEBKIT_CHILD_EXPORT size_t MemoryUsageKB(); - -} // webkit_glue - -#endif // WEBKIT_CHILD_WEBKIT_CHILD_HELPERS_H_ diff --git a/webkit/child/webkitplatformsupport_child_impl.h b/webkit/child/webkitplatformsupport_child_impl.h index 5ba71d8..abb6338 100644 --- a/webkit/child/webkitplatformsupport_child_impl.h +++ b/webkit/child/webkitplatformsupport_child_impl.h @@ -8,7 +8,7 @@ #include "base/threading/thread_local_storage.h" #include "webkit/child/webfallbackthemeengine_impl.h" #include "webkit/child/webkit_child_export.h" -#include "webkit/child/webkitplatformsupport_impl.h" +#include "webkit/glue/webkitplatformsupport_impl.h" #if defined(USE_DEFAULT_RENDER_THEME) #include "webkit/child/webthemeengine_impl_default.h" diff --git a/webkit/common/resource_request_body.h b/webkit/common/resource_request_body.h index c0bdc08..5c1edd1 100644 --- a/webkit/common/resource_request_body.h +++ b/webkit/common/resource_request_body.h @@ -62,4 +62,4 @@ class WEBKIT_COMMON_EXPORT ResourceRequestBody } // namespace webkit_glue -#endif // WEBKIT_COMMON_RESOURCE_REQUEST_BODY_H_ +#endif // WEBKIT_GLUE_RESOURCE_REQUEST_BODY_H_ diff --git a/webkit/common/webkit_common.gyp b/webkit/common/webkit_common.gyp index af1c688..e3b6579 100644 --- a/webkit/common/webkit_common.gyp +++ b/webkit/common/webkit_common.gyp @@ -15,8 +15,8 @@ 'WEBKIT_COMMON_IMPLEMENTATION', ], 'dependencies': [ - '<(DEPTH)/base/base.gyp:base', '<(DEPTH)/base/base.gyp:base_i18n', + '<(DEPTH)/base/base.gyp:base', '<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', '<(DEPTH)/net/net.gyp:net', '<(DEPTH)/skia/skia.gyp:skia', @@ -39,10 +39,10 @@ 'cursors/webcursor_aura.cc', 'cursors/webcursor_aurawin.cc', 'cursors/webcursor_aurax11.cc', + 'cursors/webcursor_null.cc', 'cursors/webcursor_gtk.cc', 'cursors/webcursor_gtk_data.h', 'cursors/webcursor_mac.mm', - 'cursors/webcursor_null.cc', 'cursors/webcursor_win.cc', 'data_element.cc', 'data_element.h', @@ -52,8 +52,6 @@ 'resource_request_body.h', 'resource_response_info.cc', 'resource_response_info.h', - 'resource_type.cc', - 'resource_type.h', ], 'conditions': [ diff --git a/webkit/child/ftp_directory_listing_response_delegate.cc b/webkit/glue/ftp_directory_listing_response_delegate.cc index d84ada6..0629000 100644 --- a/webkit/child/ftp_directory_listing_response_delegate.cc +++ b/webkit/glue/ftp_directory_listing_response_delegate.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/child/ftp_directory_listing_response_delegate.h" +#include "webkit/glue/ftp_directory_listing_response_delegate.h" #include <vector> @@ -19,7 +19,7 @@ #include "net/ftp/ftp_directory_listing_parser.h" #include "third_party/WebKit/public/platform/WebURL.h" #include "third_party/WebKit/public/platform/WebURLLoaderClient.h" -#include "webkit/child/weburlresponse_extradata_impl.h" +#include "webkit/glue/weburlresponse_extradata_impl.h" using net::FtpDirectoryListingEntry; diff --git a/webkit/glue/ftp_directory_listing_response_delegate.h b/webkit/glue/ftp_directory_listing_response_delegate.h new file mode 100644 index 0000000..0562049 --- /dev/null +++ b/webkit/glue/ftp_directory_listing_response_delegate.h @@ -0,0 +1,53 @@ +// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +// +// A delegate class of WebURLLoaderImpl that handles text/vnd.chromium.ftp-dir +// data. + +#ifndef WEBKIT_GLUE_FTP_DIRECTORY_LISTING_RESPONSE_DELEGATE_H_ +#define WEBKIT_GLUE_FTP_DIRECTORY_LISTING_RESPONSE_DELEGATE_H_ + +#include <string> + +#include "base/basictypes.h" +#include "third_party/WebKit/public/platform/WebURLResponse.h" + +namespace WebKit { +class WebURLLoader; +class WebURLLoaderClient; +} + +class GURL; + +namespace webkit_glue { + +class FtpDirectoryListingResponseDelegate { + public: + FtpDirectoryListingResponseDelegate(WebKit::WebURLLoaderClient* client, + WebKit::WebURLLoader* loader, + const WebKit::WebURLResponse& response); + + // Passed through from ResourceHandleInternal + void OnReceivedData(const char* data, int data_len); + void OnCompletedRequest(); + + private: + void Init(const GURL& response_url); + + void SendDataToClient(const std::string& data); + + // Pointers to the client and associated loader so we can make callbacks as + // we parse pieces of data. + WebKit::WebURLLoaderClient* client_; + WebKit::WebURLLoader* loader_; + + // Buffer for data received from the network. + std::string buffer_; + + DISALLOW_COPY_AND_ASSIGN(FtpDirectoryListingResponseDelegate); +}; + +} // namespace webkit_glue + +#endif // WEBKIT_GLUE_FTP_DIRECTORY_LISTING_RESPONSE_DELEGATE_H_ diff --git a/webkit/child/multipart_response_delegate.cc b/webkit/glue/multipart_response_delegate.cc index 06af916..325caf9 100644 --- a/webkit/child/multipart_response_delegate.cc +++ b/webkit/glue/multipart_response_delegate.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/child/multipart_response_delegate.h" +#include "webkit/glue/multipart_response_delegate.h" #include "base/logging.h" #include "base/strings/string_number_conversions.h" diff --git a/webkit/child/multipart_response_delegate.h b/webkit/glue/multipart_response_delegate.h index f85c1cf..6de1591 100644 --- a/webkit/child/multipart_response_delegate.h +++ b/webkit/glue/multipart_response_delegate.h @@ -46,14 +46,14 @@ * * ***** END LICENSE BLOCK ***** */ -#ifndef WEBKIT_CHILD_MULTIPART_RESPONSE_DELEGATE_H_ -#define WEBKIT_CHILD_MULTIPART_RESPONSE_DELEGATE_H_ +#ifndef WEBKIT_GLUE_MULTIPART_RESPONSE_DELEGATE_H_ +#define WEBKIT_GLUE_MULTIPART_RESPONSE_DELEGATE_H_ #include <string> #include "base/basictypes.h" #include "third_party/WebKit/public/platform/WebURLResponse.h" -#include "webkit/child/webkit_child_export.h" +#include "webkit/common/webkit_common_export.h" namespace WebKit { class WebURLLoader; @@ -65,7 +65,7 @@ namespace webkit_glue { // Used by unit tests to access private members. class MultipartResponseDelegateTester; -class WEBKIT_CHILD_EXPORT MultipartResponseDelegate { +class WEBKIT_COMMON_EXPORT MultipartResponseDelegate { public: MultipartResponseDelegate(WebKit::WebURLLoaderClient* client, WebKit::WebURLLoader* loader, @@ -150,4 +150,4 @@ class WEBKIT_CHILD_EXPORT MultipartResponseDelegate { } // namespace webkit_glue -#endif // WEBKIT_CHILD_MULTIPART_RESPONSE_DELEGATE_H_ +#endif diff --git a/webkit/child/multipart_response_delegate_unittest.cc b/webkit/glue/multipart_response_delegate_unittest.cc index 34ea209..8e43d85 100644 --- a/webkit/child/multipart_response_delegate_unittest.cc +++ b/webkit/glue/multipart_response_delegate_unittest.cc @@ -5,12 +5,12 @@ #include <vector> #include "base/basictypes.h" -#include "testing/gtest/include/gtest/gtest.h" #include "third_party/WebKit/public/platform/WebString.h" #include "third_party/WebKit/public/platform/WebURL.h" #include "third_party/WebKit/public/platform/WebURLLoaderClient.h" #include "third_party/WebKit/public/platform/WebURLResponse.h" -#include "webkit/child/multipart_response_delegate.h" +#include "webkit/glue/multipart_response_delegate.h" +#include "testing/gtest/include/gtest/gtest.h" using std::string; using WebKit::WebString; diff --git a/webkit/child/resource_loader_bridge.cc b/webkit/glue/resource_loader_bridge.cc index 077f557..4d8eabe 100644 --- a/webkit/child/resource_loader_bridge.cc +++ b/webkit/glue/resource_loader_bridge.cc @@ -2,11 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "webkit/child/resource_loader_bridge.h" +#include "webkit/glue/resource_loader_bridge.h" #include "net/http/http_response_headers.h" #include "webkit/common/appcache/appcache_interfaces.h" -#include "webkit/common/resource_response_info.h" namespace webkit_glue { diff --git a/webkit/child/resource_loader_bridge.h b/webkit/glue/resource_loader_bridge.h index 9d51b62..3df3cc3 100644 --- a/webkit/child/resource_loader_bridge.h +++ b/webkit/glue/resource_loader_bridge.h @@ -13,8 +13,8 @@ // In turn, the bridge's owner on the WebKit end will implement the Peer // interface, which we will use to communicate notifications back. -#ifndef WEBKIT_CHILD_RESOURCE_LOADER_BRIDGE_H_ -#define WEBKIT_CHILD_RESOURCE_LOADER_BRIDGE_H_ +#ifndef WEBKIT_GLUE_RESOURCE_LOADER_BRIDGE_H_ +#define WEBKIT_GLUE_RESOURCE_LOADER_BRIDGE_H_ #include <utility> @@ -29,9 +29,9 @@ #include "third_party/WebKit/public/platform/WebReferrerPolicy.h" #include "third_party/WebKit/public/platform/WebURLRequest.h" #include "url/gurl.h" -#include "webkit/child/webkit_child_export.h" #include "webkit/common/resource_response_info.h" -#include "webkit/common/resource_type.h" +#include "webkit/glue/resource_type.h" +#include "webkit/glue/webkit_glue_export.h" namespace webkit_glue { class ResourceRequestBody; @@ -40,7 +40,7 @@ class ResourceLoaderBridge { public: // Structure used when calling // WebKitPlatformSupportImpl::CreateResourceLoader(). - struct WEBKIT_CHILD_EXPORT RequestInfo { + struct WEBKIT_GLUE_EXPORT RequestInfo { RequestInfo(); ~RequestInfo(); @@ -106,8 +106,8 @@ class ResourceLoaderBridge { // See the SyncLoad method declared below. (The name of this struct is not // suffixed with "Info" because it also contains the response data.) struct SyncLoadResponse : ResourceResponseInfo { - WEBKIT_CHILD_EXPORT SyncLoadResponse(); - WEBKIT_CHILD_EXPORT ~SyncLoadResponse(); + SyncLoadResponse(); + ~SyncLoadResponse(); // The response error code. int error_code; @@ -182,7 +182,7 @@ class ResourceLoaderBridge { // use WebKitPlatformSupportImpl::CreateResourceLoader() for construction, but // anybody can delete at any time, INCLUDING during processing of callbacks. - WEBKIT_CHILD_EXPORT virtual ~ResourceLoaderBridge(); + WEBKIT_GLUE_EXPORT virtual ~ResourceLoaderBridge(); // Call this method before calling Start() to set the request body. // May only be used with HTTP(S) POST requests. @@ -221,7 +221,7 @@ class ResourceLoaderBridge { // WebKitPlatformSupportImpl::CreateResourceLoader() // For HTTP(S) POST requests, the AppendDataToUpload and AppendFileToUpload // methods may be called to construct the body of the request. - WEBKIT_CHILD_EXPORT ResourceLoaderBridge(); + WEBKIT_GLUE_EXPORT ResourceLoaderBridge(); private: DISALLOW_COPY_AND_ASSIGN(ResourceLoaderBridge); @@ -229,4 +229,4 @@ class ResourceLoaderBridge { } // namespace webkit_glue -#endif // WEBKIT_CHILD_RESOURCE_LOADER_BRIDGE_H_ +#endif // WEBKIT_GLUE_RESOURCE_LOADER_BRIDGE_H_ diff --git a/webkit/common/resource_type.cc b/webkit/glue/resource_type.cc index 2c416d3..e6df456 100644 --- a/webkit/common/resource_type.cc +++ b/webkit/glue/resource_type.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/common/resource_type.h" +#include "webkit/glue/resource_type.h" #include "base/logging.h" diff --git a/webkit/common/resource_type.h b/webkit/glue/resource_type.h index 9ec7909..f083806 100644 --- a/webkit/common/resource_type.h +++ b/webkit/glue/resource_type.h @@ -2,12 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef WEBKIT_COMMON_RESOURCE_TYPE_H__ -#define WEBKIT_COMMON_RESOURCE_TYPE_H__ +#ifndef WEBKIT_GLUE_RESOURCE_TYPE_H__ +#define WEBKIT_GLUE_RESOURCE_TYPE_H__ #include "base/basictypes.h" #include "third_party/WebKit/public/platform/WebURLRequest.h" -#include "webkit/common/webkit_common_export.h" +#include "webkit/glue/webkit_glue_export.h" class ResourceType { public: @@ -41,7 +41,7 @@ class ResourceType { return static_cast<Type>(type); } - WEBKIT_COMMON_EXPORT static Type FromTargetType( + WEBKIT_GLUE_EXPORT static Type FromTargetType( WebKit::WebURLRequest::TargetType type); static bool IsFrame(ResourceType::Type type) { @@ -67,4 +67,4 @@ class ResourceType { ResourceType(); ~ResourceType(); }; -#endif // WEBKIT_COMMON_RESOURCE_TYPE_H__ +#endif // WEBKIT_GLUE_RESOURCE_TYPE_H__ diff --git a/webkit/glue/webkit_glue.cc b/webkit/glue/webkit_glue.cc index 4c832f3..2ef0e57 100644 --- a/webkit/glue/webkit_glue.cc +++ b/webkit/glue/webkit_glue.cc @@ -89,4 +89,39 @@ int GetGlyphPageCount() { COMPILE_ASSERT(std::numeric_limits<double>::has_quiet_NaN, has_quiet_NaN); +#if defined(OS_LINUX) || defined(OS_ANDROID) +size_t MemoryUsageKB() { + struct mallinfo minfo = mallinfo(); + uint64_t mem_usage = +#if defined(USE_TCMALLOC) + minfo.uordblks +#else + (minfo.hblkhd + minfo.arena) +#endif + >> 10; + + v8::HeapStatistics stat; + // TODO(svenpanne) The call below doesn't take web workers into account, this + // has to be done manually by iterating over all Isolates involved. + v8::Isolate::GetCurrent()->GetHeapStatistics(&stat); + return mem_usage + (static_cast<uint64_t>(stat.total_heap_size()) >> 10); +} +#elif defined(OS_MACOSX) +size_t MemoryUsageKB() { + scoped_ptr<base::ProcessMetrics> process_metrics( + // The default port provider is sufficient to get data for the current + // process. + base::ProcessMetrics::CreateProcessMetrics( + base::GetCurrentProcessHandle(), NULL)); + return process_metrics->GetWorkingSetSize() >> 10; +} +#else +size_t MemoryUsageKB() { + scoped_ptr<base::ProcessMetrics> process_metrics( + base::ProcessMetrics::CreateProcessMetrics( + base::GetCurrentProcessHandle())); + return process_metrics->GetPagefileUsage() >> 10; +} +#endif + } // namespace webkit_glue diff --git a/webkit/glue/webkit_glue.gypi b/webkit/glue/webkit_glue.gypi index 347fe30..a12d4c6 100644 --- a/webkit/glue/webkit_glue.gypi +++ b/webkit/glue/webkit_glue.gypi @@ -19,38 +19,26 @@ ], 'dependencies': [ '<(DEPTH)/base/base.gyp:base', - '<(DEPTH)/base/base.gyp:base_i18n', - '<(DEPTH)/base/base.gyp:base_static', '<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', - '<(DEPTH)/net/net.gyp:net', '<(DEPTH)/skia/skia.gyp:skia', '<(DEPTH)/third_party/WebKit/public/blink.gyp:blink', '<(DEPTH)/ui/native_theme/native_theme.gyp:native_theme', '<(DEPTH)/ui/ui.gyp:ui', - '<(DEPTH)/url/url.gyp:url_lib', - '<(DEPTH)/v8/tools/gyp/v8.gyp:v8', - '<(DEPTH)/webkit/common/user_agent/webkit_user_agent.gyp:user_agent', - '<(DEPTH)/webkit/common/webkit_common.gyp:webkit_common', - '<(DEPTH)/webkit/plugins/webkit_plugins.gyp:plugins_common', + + # TODO(scottmg): crbug.com/237249 + 'glue', ], 'include_dirs': [ # For JNI generated header. '<(SHARED_INTERMEDIATE_DIR)/webkit', ], - 'hard_dependency': 1, 'sources': [ '../child/fling_animator_impl_android.cc', '../child/fling_animator_impl_android.h', '../child/fling_curve_configuration.cc', '../child/fling_curve_configuration.h', - '../child/ftp_directory_listing_response_delegate.cc', - '../child/ftp_directory_listing_response_delegate.h', - '../child/multipart_response_delegate.cc', - '../child/multipart_response_delegate.h', - '../child/resource_loader_bridge.cc', - '../child/resource_loader_bridge.h', '../child/touch_fling_gesture_curve.cc', '../child/touch_fling_gesture_curve.h', '../child/web_discardable_memory_impl.cc', @@ -58,15 +46,8 @@ '../child/webfallbackthemeengine_impl.cc', '../child/webfallbackthemeengine_impl.h', '../child/webkit_child_export.h', - '../child/webkit_child_helpers.cc', - '../child/webkit_child_helpers.h', '../child/webkitplatformsupport_child_impl.cc', '../child/webkitplatformsupport_child_impl.h', - '../child/webkitplatformsupport_impl.cc', - '../child/webkitplatformsupport_impl.h', - '../child/websocketstreamhandle_delegate.h', - '../child/websocketstreamhandle_impl.cc', - '../child/websocketstreamhandle_impl.h', '../child/webthemeengine_impl_android.cc', '../child/webthemeengine_impl_android.h', '../child/webthemeengine_impl_default.cc', @@ -77,12 +58,6 @@ '../child/webthemeengine_impl_win.h', '../child/webthread_impl.cc', '../child/webthread_impl.h', - '../child/weburlloader_impl.cc', - '../child/weburlloader_impl.h', - '../child/weburlrequest_extradata_impl.cc', - '../child/weburlrequest_extradata_impl.h', - '../child/weburlresponse_extradata_impl.cc', - '../child/weburlresponse_extradata_impl.h', '../child/worker_task_runner.cc', '../child/worker_task_runner.h', ], @@ -154,7 +129,13 @@ '<(SHARED_INTERMEDIATE_DIR)/ui', ], 'sources': [ + 'ftp_directory_listing_response_delegate.cc', + 'ftp_directory_listing_response_delegate.h', 'network_list_observer.h', + 'resource_loader_bridge.cc', + 'resource_loader_bridge.h', + 'resource_type.cc', + 'resource_type.h', 'simple_webmimeregistry_impl.cc', 'simple_webmimeregistry_impl.h', 'webfileutilities_impl.cc', @@ -162,7 +143,14 @@ 'webkit_glue.cc', 'webkit_glue.h', 'webkit_glue_export.h', + 'webkitplatformsupport_impl.cc', + 'webkitplatformsupport_impl.h', 'websocketstreamhandle_bridge.h', + 'websocketstreamhandle_delegate.h', + 'websocketstreamhandle_impl.cc', + 'websocketstreamhandle_impl.h', + 'weburlloader_impl.cc', + 'weburlloader_impl.h', ], # When glue is a dependency, it needs to be a hard dependency. # Dependents may rely on files generated by this target or one of its diff --git a/webkit/glue/webkit_glue.h b/webkit/glue/webkit_glue.h index 33fed9f..2a9d74d 100644 --- a/webkit/glue/webkit_glue.h +++ b/webkit/glue/webkit_glue.h @@ -46,6 +46,12 @@ WEBKIT_GLUE_EXPORT WebKit::WebCanvas* ToWebCanvas(SkCanvas*); // used to get memory usage statistics. WEBKIT_GLUE_EXPORT int GetGlyphPageCount(); +// Returns an estimate of the memory usage of the renderer process. Different +// platforms implement this function differently, and count in different +// allocations. Results are not comparable across platforms. The estimate is +// computed inside the sandbox and thus its not always accurate. +WEBKIT_GLUE_EXPORT size_t MemoryUsageKB(); + } // namespace webkit_glue #endif // WEBKIT_GLUE_WEBKIT_GLUE_H_ diff --git a/webkit/glue/webkit_glue_common.gyp b/webkit/glue/webkit_glue_common.gyp index 51f152e..ff845ef 100644 --- a/webkit/glue/webkit_glue_common.gyp +++ b/webkit/glue/webkit_glue_common.gyp @@ -26,6 +26,12 @@ '../common/webkit_common_export.h', '../common/webpreferences.cc', '../common/webpreferences.h', + 'multipart_response_delegate.cc', + 'multipart_response_delegate.h', + 'weburlrequest_extradata_impl.cc', + 'weburlrequest_extradata_impl.h', + 'weburlresponse_extradata_impl.cc', + 'weburlresponse_extradata_impl.h', ], 'conditions': [ ['toolkit_uses_gtk == 1', { diff --git a/webkit/glue/webkit_glue_unittest.cc b/webkit/glue/webkit_glue_unittest.cc index 50b57ab..27879e8 100644 --- a/webkit/glue/webkit_glue_unittest.cc +++ b/webkit/glue/webkit_glue_unittest.cc @@ -9,7 +9,7 @@ #include "base/message_loop/message_loop.h" #include "base/time/time.h" #include "testing/gtest/include/gtest/gtest.h" -#include "webkit/child/webkitplatformsupport_impl.h" +#include "webkit/glue/webkitplatformsupport_impl.h" namespace { diff --git a/webkit/child/webkitplatformsupport_impl.cc b/webkit/glue/webkitplatformsupport_impl.cc index 31a355e0..e592058 100644 --- a/webkit/child/webkitplatformsupport_impl.cc +++ b/webkit/glue/webkitplatformsupport_impl.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/child/webkitplatformsupport_impl.h" +#include "webkit/glue/webkitplatformsupport_impl.h" #include <math.h> @@ -26,7 +26,6 @@ #include "base/synchronization/lock.h" #include "base/sys_info.h" #include "base/time/time.h" -#include "content/public/common/webplugininfo.h" #include "grit/webkit_chromium_resources.h" #include "grit/webkit_resources.h" #include "grit/webkit_strings.h" @@ -37,7 +36,6 @@ #include "third_party/WebKit/public/platform/WebData.h" #include "third_party/WebKit/public/platform/WebDiscardableMemory.h" #include "third_party/WebKit/public/platform/WebGestureCurve.h" -#include "third_party/WebKit/public/platform/WebPluginListBuilder.h" #include "third_party/WebKit/public/platform/WebString.h" #include "third_party/WebKit/public/platform/WebURL.h" #include "third_party/WebKit/public/platform/WebVector.h" @@ -46,11 +44,10 @@ #include "third_party/WebKit/public/web/WebScreenInfo.h" #include "third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h" #include "ui/base/layout.h" -#include "webkit/child/webkit_child_helpers.h" -#include "webkit/child/websocketstreamhandle_impl.h" -#include "webkit/child/weburlloader_impl.h" #include "webkit/common/user_agent/user_agent.h" #include "webkit/glue/webkit_glue.h" +#include "webkit/glue/websocketstreamhandle_impl.h" +#include "webkit/glue/weburlloader_impl.h" using WebKit::WebAudioBus; using WebKit::WebCookie; diff --git a/webkit/child/webkitplatformsupport_impl.h b/webkit/glue/webkitplatformsupport_impl.h index e9077582..68fcb2a 100644 --- a/webkit/child/webkitplatformsupport_impl.h +++ b/webkit/glue/webkitplatformsupport_impl.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef WEBKIT_CHILD_WEBKITPLATFORMSUPPORT_IMPL_H_ -#define WEBKIT_CHILD_WEBKITPLATFORMSUPPORT_IMPL_H_ +#ifndef WEBKIT_PLATFORM_SUPPORT_IMPL_H_ +#define WEBKIT_PLATFORM_SUPPORT_IMPL_H_ #include "base/compiler_specific.h" #include "base/debug/trace_event.h" @@ -12,8 +12,8 @@ #include "third_party/WebKit/public/platform/Platform.h" #include "third_party/WebKit/public/platform/WebURLError.h" #include "ui/base/layout.h" -#include "webkit/child/resource_loader_bridge.h" -#include "webkit/child/webkit_child_export.h" +#include "webkit/glue/resource_loader_bridge.h" +#include "webkit/glue/webkit_glue_export.h" namespace base { class MessageLoop; @@ -28,7 +28,7 @@ namespace webkit_glue { class WebSocketStreamHandleDelegate; class WebSocketStreamHandleBridge; -class WEBKIT_CHILD_EXPORT WebKitPlatformSupportImpl : +class WEBKIT_GLUE_EXPORT WebKitPlatformSupportImpl : NON_EXPORTED_BASE(public WebKit::Platform) { public: WebKitPlatformSupportImpl(); @@ -152,4 +152,4 @@ class WEBKIT_CHILD_EXPORT WebKitPlatformSupportImpl : } // namespace webkit_glue -#endif // WEBKIT_CHILD_WEBKITPLATFORMSUPPORT_IMPL_H_ +#endif // WEBKIT_PLATFORM_SUPPORT_IMPL_H_ diff --git a/webkit/glue/websocketstreamhandle_delegate.h b/webkit/glue/websocketstreamhandle_delegate.h new file mode 100644 index 0000000..2d02329 --- /dev/null +++ b/webkit/glue/websocketstreamhandle_delegate.h @@ -0,0 +1,44 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef WEBKIT_GLUE_WEBSOCKETSTREAMHANDLE_DELEGATE_H_ +#define WEBKIT_GLUE_WEBSOCKETSTREAMHANDLE_DELEGATE_H_ + +#include "base/strings/string16.h" + +class GURL; + +namespace WebKit { +class WebSocketStreamHandle; +} + +namespace webkit_glue { + +class WebSocketStreamHandleDelegate { + public: + WebSocketStreamHandleDelegate() {} + + virtual void WillOpenStream(WebKit::WebSocketStreamHandle* handle, + const GURL& url) {} + virtual void WillSendData(WebKit::WebSocketStreamHandle* handle, + const char* data, int len) {} + + virtual void DidOpenStream(WebKit::WebSocketStreamHandle* handle, + int max_amount_send_allowed) {} + virtual void DidSendData(WebKit::WebSocketStreamHandle* handle, + int amount_sent) {} + virtual void DidReceiveData(WebKit::WebSocketStreamHandle* handle, + const char* data, int len) {} + virtual void DidClose(WebKit::WebSocketStreamHandle*) {} + virtual void DidFail(WebKit::WebSocketStreamHandle* handle, + int error_code, + const string16& error_msg) {} + + protected: + virtual ~WebSocketStreamHandleDelegate() {} +}; + +} // namespace webkit_glue + +#endif // WEBKIT_GLUE_WEBSOCKETSTREAMHANDLE_DELEGATE_H_ diff --git a/webkit/child/websocketstreamhandle_impl.cc b/webkit/glue/websocketstreamhandle_impl.cc index f7da0e2..7736dd5 100644 --- a/webkit/child/websocketstreamhandle_impl.cc +++ b/webkit/glue/websocketstreamhandle_impl.cc @@ -4,7 +4,7 @@ // An implementation of WebSocketStreamHandle. -#include "webkit/child/websocketstreamhandle_impl.h" +#include "webkit/glue/websocketstreamhandle_impl.h" #include <vector> @@ -17,9 +17,9 @@ #include "third_party/WebKit/public/platform/WebSocketStreamError.h" #include "third_party/WebKit/public/platform/WebSocketStreamHandleClient.h" #include "third_party/WebKit/public/platform/WebURL.h" -#include "webkit/child/webkitplatformsupport_impl.h" -#include "webkit/child/websocketstreamhandle_delegate.h" +#include "webkit/glue/webkitplatformsupport_impl.h" #include "webkit/glue/websocketstreamhandle_bridge.h" +#include "webkit/glue/websocketstreamhandle_delegate.h" using WebKit::WebData; using WebKit::WebSocketStreamError; diff --git a/webkit/glue/websocketstreamhandle_impl.h b/webkit/glue/websocketstreamhandle_impl.h new file mode 100644 index 0000000..827bb88 --- /dev/null +++ b/webkit/glue/websocketstreamhandle_impl.h @@ -0,0 +1,40 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef WEBKIT_GLUE_WEBSOCKETSTREAMHANDLE_IMPL_H_ +#define WEBKIT_GLUE_WEBSOCKETSTREAMHANDLE_IMPL_H_ + +#include "base/memory/ref_counted.h" +#include "base/supports_user_data.h" +#include "third_party/WebKit/public/platform/WebSocketStreamHandle.h" + +namespace webkit_glue { + +class WebKitPlatformSupportImpl; + +class WebSocketStreamHandleImpl + : public base::SupportsUserData, + public WebKit::WebSocketStreamHandle { + public: + explicit WebSocketStreamHandleImpl(WebKitPlatformSupportImpl* platform); + virtual ~WebSocketStreamHandleImpl(); + + // WebSocketStreamHandle methods: + virtual void connect( + const WebKit::WebURL& url, + WebKit::WebSocketStreamHandleClient* client); + virtual bool send(const WebKit::WebData& data); + virtual void close(); + + private: + class Context; + scoped_refptr<Context> context_; + WebKitPlatformSupportImpl* platform_; + + DISALLOW_COPY_AND_ASSIGN(WebSocketStreamHandleImpl); +}; + +} // namespace webkit_glue + +#endif // WEBKIT_GLUE_WEBSOCKETSTREAMHANDLE_IMPL_H_ diff --git a/webkit/child/weburlloader_impl.cc b/webkit/glue/weburlloader_impl.cc index 40b15ed..2f12b18 100644 --- a/webkit/child/weburlloader_impl.cc +++ b/webkit/glue/weburlloader_impl.cc @@ -4,7 +4,7 @@ // An implementation of WebURLLoader in terms of ResourceLoaderBridge. -#include "webkit/child/weburlloader_impl.h" +#include "webkit/glue/weburlloader_impl.h" #include "base/bind.h" #include "base/files/file_path.h" @@ -24,18 +24,18 @@ #include "third_party/WebKit/public/platform/WebHTTPLoadInfo.h" #include "third_party/WebKit/public/platform/WebURL.h" #include "third_party/WebKit/public/platform/WebURLError.h" -#include "third_party/WebKit/public/platform/WebURLLoadTiming.h" #include "third_party/WebKit/public/platform/WebURLLoaderClient.h" +#include "third_party/WebKit/public/platform/WebURLLoadTiming.h" #include "third_party/WebKit/public/platform/WebURLRequest.h" #include "third_party/WebKit/public/platform/WebURLResponse.h" #include "third_party/WebKit/public/web/WebSecurityPolicy.h" -#include "webkit/child/ftp_directory_listing_response_delegate.h" -#include "webkit/child/multipart_response_delegate.h" -#include "webkit/child/resource_loader_bridge.h" -#include "webkit/child/webkitplatformsupport_impl.h" -#include "webkit/child/weburlrequest_extradata_impl.h" -#include "webkit/child/weburlresponse_extradata_impl.h" #include "webkit/common/resource_request_body.h" +#include "webkit/glue/ftp_directory_listing_response_delegate.h" +#include "webkit/glue/multipart_response_delegate.h" +#include "webkit/glue/resource_loader_bridge.h" +#include "webkit/glue/webkitplatformsupport_impl.h" +#include "webkit/glue/weburlrequest_extradata_impl.h" +#include "webkit/glue/weburlresponse_extradata_impl.h" using base::Time; using base::TimeTicks; diff --git a/webkit/child/weburlloader_impl.h b/webkit/glue/weburlloader_impl.h index 1412b32..ecca9f4 100644 --- a/webkit/child/weburlloader_impl.h +++ b/webkit/glue/weburlloader_impl.h @@ -2,11 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef WEBKIT_CHILD_WEBURLLOADER_IMPL_H_ -#define WEBKIT_CHILD_WEBURLLOADER_IMPL_H_ +#ifndef WEBKIT_GLUE_WEBURLLOADER_IMPL_H_ +#define WEBKIT_GLUE_WEBURLLOADER_IMPL_H_ #include "base/memory/ref_counted.h" #include "third_party/WebKit/public/platform/WebURLLoader.h" +#include "webkit/glue/webkit_glue_export.h" namespace webkit_glue { @@ -41,4 +42,4 @@ class WebURLLoaderImpl : public WebKit::WebURLLoader { } // namespace webkit_glue -#endif // WEBKIT_CHILD_WEBURLLOADER_IMPL_H_ +#endif // WEBKIT_GLUE_WEBURLLOADER_IMPL_H_ diff --git a/webkit/child/weburlrequest_extradata_impl.cc b/webkit/glue/weburlrequest_extradata_impl.cc index 231672c..d9e7462 100644 --- a/webkit/child/weburlrequest_extradata_impl.cc +++ b/webkit/glue/weburlrequest_extradata_impl.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/child/weburlrequest_extradata_impl.h" +#include "webkit/glue/weburlrequest_extradata_impl.h" using WebKit::WebReferrerPolicy; using WebKit::WebString; diff --git a/webkit/child/weburlrequest_extradata_impl.h b/webkit/glue/weburlrequest_extradata_impl.h index 6e5dccd..151c4845 100644 --- a/webkit/child/weburlrequest_extradata_impl.h +++ b/webkit/glue/weburlrequest_extradata_impl.h @@ -2,20 +2,20 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef WEBKIT_CHILD_WEBURLREQUEST_EXTRADATA_IMPL_H_ -#define WEBKIT_CHILD_WEBURLREQUEST_EXTRADATA_IMPL_H_ +#ifndef WEBKIT_GLUE_WEBURLREQUEST_EXTRADATA_IMPL_H_ +#define WEBKIT_GLUE_WEBURLREQUEST_EXTRADATA_IMPL_H_ #include "base/compiler_specific.h" #include "third_party/WebKit/public/platform/WebReferrerPolicy.h" #include "third_party/WebKit/public/platform/WebString.h" #include "third_party/WebKit/public/platform/WebURLRequest.h" -#include "webkit/child/webkit_child_export.h" +#include "webkit/common/webkit_common_export.h" namespace webkit_glue { // Base class for Chrome's implementation of the "extra data" stored in each // ResourceRequest. -class WEBKIT_CHILD_EXPORT WebURLRequestExtraDataImpl : +class WEBKIT_COMMON_EXPORT WebURLRequestExtraDataImpl : public NON_EXPORTED_BASE(WebKit::WebURLRequest::ExtraData) { public: // |custom_user_agent| is used to communicate an overriding custom user agent @@ -42,4 +42,4 @@ class WEBKIT_CHILD_EXPORT WebURLRequestExtraDataImpl : } // namespace webkit_glue -#endif // WEBKIT_CHILD_WEBURLREQUEST_EXTRADATA_IMPL_H_ +#endif // WEBKIT_GLUE_WEBURLREQUEST_EXTRADATA_IMPL_H_ diff --git a/webkit/child/weburlresponse_extradata_impl.cc b/webkit/glue/weburlresponse_extradata_impl.cc index 89ace8a..4063662 100644 --- a/webkit/child/weburlresponse_extradata_impl.cc +++ b/webkit/glue/weburlresponse_extradata_impl.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/child/weburlresponse_extradata_impl.h" +#include "webkit/glue/weburlresponse_extradata_impl.h" namespace webkit_glue { diff --git a/webkit/child/weburlresponse_extradata_impl.h b/webkit/glue/weburlresponse_extradata_impl.h index ac87d7e..c26325c 100644 --- a/webkit/child/weburlresponse_extradata_impl.h +++ b/webkit/glue/weburlresponse_extradata_impl.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef WEBKIT_CHILD_WEBURLRESPONSE_EXTRADATA_IMPL_H_ -#define WEBKIT_CHILD_WEBURLRESPONSE_EXTRADATA_IMPL_H_ +#ifndef WEBKIT_GLUE_WEBURLRESPONSE_EXTRADATA_IMPL_H_ +#define WEBKIT_GLUE_WEBURLRESPONSE_EXTRADATA_IMPL_H_ #include <string> @@ -11,12 +11,12 @@ #include "base/compiler_specific.h" #include "net/http/http_response_info.h" #include "third_party/WebKit/public/platform/WebURLResponse.h" -#include "webkit/child/webkit_child_export.h" +#include "webkit/common/webkit_common_export.h" namespace webkit_glue { // Base class for Chrome's implementation of the "extra data". -class WEBKIT_CHILD_EXPORT WebURLResponseExtraDataImpl : +class WEBKIT_COMMON_EXPORT WebURLResponseExtraDataImpl : public NON_EXPORTED_BASE(WebKit::WebURLResponse::ExtraData) { public: explicit WebURLResponseExtraDataImpl( @@ -93,4 +93,4 @@ class WEBKIT_CHILD_EXPORT WebURLResponseExtraDataImpl : } // namespace webkit_glue -#endif // WEBKIT_CHILD_WEBURLRESPONSE_EXTRADATA_IMPL_H_ +#endif // WEBKIT_GLUE_WEBURLRESPONSE_EXTRADATA_IMPL_H_ diff --git a/webkit/mocks/mock_weburlloader.h b/webkit/mocks/mock_weburlloader.h index a9e2d6b..68ff9a2 100644 --- a/webkit/mocks/mock_weburlloader.h +++ b/webkit/mocks/mock_weburlloader.h @@ -6,7 +6,7 @@ #define WEBKIT_MOCKS_MOCK_WEBURLLOADER_H_ #include "testing/gmock/include/gmock/gmock.h" -#include "webkit/child/weburlloader_impl.h" +#include "webkit/glue/weburlloader_impl.h" namespace webkit_glue { diff --git a/webkit/plugins/ppapi/url_request_info_util.cc b/webkit/plugins/ppapi/url_request_info_util.cc index b9e765a..774a3c9 100644 --- a/webkit/plugins/ppapi/url_request_info_util.cc +++ b/webkit/plugins/ppapi/url_request_info_util.cc @@ -18,7 +18,7 @@ #include "third_party/WebKit/public/web/WebFrame.h" #include "url/gurl.h" #include "url/url_util.h" -#include "webkit/child/weburlrequest_extradata_impl.h" +#include "webkit/glue/weburlrequest_extradata_impl.h" #include "webkit/plugins/ppapi/common.h" #include "webkit/plugins/ppapi/plugin_module.h" #include "webkit/plugins/ppapi/ppb_file_ref_impl.h" diff --git a/webkit/plugins/webkit_plugins.gypi b/webkit/plugins/webkit_plugins.gypi index c63f524..0479a6c 100644 --- a/webkit/plugins/webkit_plugins.gypi +++ b/webkit/plugins/webkit_plugins.gypi @@ -41,7 +41,6 @@ '<(DEPTH)/webkit/plugins/webkit_plugins.gyp:plugins_common', '<(DEPTH)/webkit/renderer/compositor_bindings/compositor_bindings.gyp:webkit_compositor_support', '<(DEPTH)/webkit/storage_common.gyp:webkit_storage_common', - 'glue_child', ], 'sources': [ # This list contains all .h, .cc, and .mm files in glue except for diff --git a/webkit/support/test_webkit_platform_support.cc b/webkit/support/test_webkit_platform_support.cc index 8b3c5d2..bde978b 100644 --- a/webkit/support/test_webkit_platform_support.cc +++ b/webkit/support/test_webkit_platform_support.cc @@ -14,6 +14,12 @@ #include "media/base/media.h" #include "net/cookies/cookie_monster.h" #include "net/test/spawned_test_server/spawned_test_server.h" +#include "third_party/WebKit/public/web/WebDatabase.h" +#include "third_party/WebKit/public/web/WebKit.h" +#include "third_party/WebKit/public/web/WebRuntimeFeatures.h" +#include "third_party/WebKit/public/web/WebScriptController.h" +#include "third_party/WebKit/public/web/WebSecurityPolicy.h" +#include "third_party/WebKit/public/web/WebStorageEventDispatcher.h" #include "third_party/WebKit/public/platform/WebAudioDevice.h" #include "third_party/WebKit/public/platform/WebData.h" #include "third_party/WebKit/public/platform/WebFileSystem.h" @@ -22,20 +28,14 @@ #include "third_party/WebKit/public/platform/WebStorageNamespace.h" #include "third_party/WebKit/public/platform/WebString.h" #include "third_party/WebKit/public/platform/WebURL.h" -#include "third_party/WebKit/public/web/WebDatabase.h" -#include "third_party/WebKit/public/web/WebKit.h" -#include "third_party/WebKit/public/web/WebRuntimeFeatures.h" -#include "third_party/WebKit/public/web/WebScriptController.h" -#include "third_party/WebKit/public/web/WebSecurityPolicy.h" -#include "third_party/WebKit/public/web/WebStorageEventDispatcher.h" #include "v8/include/v8.h" #include "webkit/browser/database/vfs_backend.h" -#include "webkit/child/webkitplatformsupport_impl.h" #include "webkit/common/gpu/test_context_provider_factory.h" #include "webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h" #include "webkit/common/gpu/webgraphicscontext3d_provider_impl.h" #include "webkit/glue/simple_webmimeregistry_impl.h" #include "webkit/glue/webkit_glue.h" +#include "webkit/glue/webkitplatformsupport_impl.h" #include "webkit/renderer/appcache/web_application_cache_host_impl.h" #include "webkit/renderer/compositor_bindings/web_compositor_support_impl.h" #include "webkit/support/gc_extension.h" diff --git a/webkit/support/webkit_support.cc b/webkit/support/webkit_support.cc index bdb99f9..b96b537 100644 --- a/webkit/support/webkit_support.cc +++ b/webkit/support/webkit_support.cc @@ -17,10 +17,10 @@ #include "third_party/WebKit/public/web/WebKit.h" #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" #include "url/url_util.h" -#include "webkit/child/webkitplatformsupport_impl.h" #include "webkit/common/user_agent/user_agent.h" #include "webkit/common/user_agent/user_agent_util.h" #include "webkit/glue/webkit_glue.h" +#include "webkit/glue/webkitplatformsupport_impl.h" #include "webkit/support/platform_support.h" #include "webkit/support/test_webkit_platform_support.h" |