Move ResourceRequestBody to services/network in preparation of moving content/network.
https://chromium-review.googlesource.com/864422
This commit is contained in:
parent
d3c6aa12d1
commit
37168c0a95
8 changed files with 22 additions and 19 deletions
|
@ -696,7 +696,7 @@ bool App::CanCreateWindow(
|
|||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
const std::vector<std::string>& additional_features,
|
||||
const scoped_refptr<content::ResourceRequestBody>& body,
|
||||
const scoped_refptr<network::ResourceRequestBody>& body,
|
||||
bool user_gesture,
|
||||
bool opener_suppressed,
|
||||
bool* no_javascript_access) {
|
||||
|
|
|
@ -147,7 +147,7 @@ class App : public AtomBrowserClient::Delegate,
|
|||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
const std::vector<std::string>& additional_features,
|
||||
const scoped_refptr<content::ResourceRequestBody>& body,
|
||||
const scoped_refptr<network::ResourceRequestBody>& body,
|
||||
bool user_gesture,
|
||||
bool opener_suppressed,
|
||||
bool* no_javascript_access) override;
|
||||
|
|
|
@ -550,7 +550,7 @@ void WebContents::OnCreateWindow(
|
|||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const std::vector<std::string>& features,
|
||||
const scoped_refptr<content::ResourceRequestBody>& body) {
|
||||
const scoped_refptr<network::ResourceRequestBody>& body) {
|
||||
if (type_ == BROWSER_WINDOW || type_ == OFF_SCREEN)
|
||||
Emit("-new-window", target_url, frame_name, disposition, features, body,
|
||||
referrer);
|
||||
|
@ -1175,7 +1175,7 @@ void WebContents::LoadURL(const GURL& url, const mate::Dictionary& options) {
|
|||
if (options.Get("extraHeaders", &extra_headers))
|
||||
params.extra_headers = extra_headers;
|
||||
|
||||
scoped_refptr<content::ResourceRequestBody> body;
|
||||
scoped_refptr<network::ResourceRequestBody> body;
|
||||
if (options.Get("postData", &body)) {
|
||||
params.post_data = body;
|
||||
params.load_type = content::NavigationController::LOAD_TYPE_HTTP_POST;
|
||||
|
|
|
@ -31,15 +31,15 @@ namespace brightray {
|
|||
class InspectableWebContents;
|
||||
}
|
||||
|
||||
namespace content {
|
||||
class ResourceRequestBody;
|
||||
}
|
||||
|
||||
namespace mate {
|
||||
class Arguments;
|
||||
class Dictionary;
|
||||
} // namespace mate
|
||||
|
||||
namespace network {
|
||||
class ResourceRequestBody;
|
||||
}
|
||||
|
||||
namespace atom {
|
||||
|
||||
struct SetSizeParams;
|
||||
|
@ -228,7 +228,7 @@ class WebContents : public mate::TrackableObject<WebContents>,
|
|||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const std::vector<std::string>& features,
|
||||
const scoped_refptr<content::ResourceRequestBody>& body);
|
||||
const scoped_refptr<network::ResourceRequestBody>& body);
|
||||
|
||||
// Returns the web preferences of current WebContents.
|
||||
v8::Local<v8::Value> GetWebPreferences(v8::Isolate* isolate);
|
||||
|
|
|
@ -44,11 +44,11 @@
|
|||
#include "content/public/browser/web_contents.h"
|
||||
#include "content/public/common/content_paths.h"
|
||||
#include "content/public/common/content_switches.h"
|
||||
#include "content/public/common/resource_request_body.h"
|
||||
#include "content/public/common/url_constants.h"
|
||||
#include "content/public/common/web_preferences.h"
|
||||
#include "net/ssl/ssl_cert_request_info.h"
|
||||
#include "ppapi/host/ppapi_host.h"
|
||||
#include "services/network/public/cpp/resource_request_body.h"
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
#include "v8/include/v8.h"
|
||||
|
||||
|
@ -415,7 +415,7 @@ bool AtomBrowserClient::CanCreateWindow(
|
|||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
const std::vector<std::string>& additional_features,
|
||||
const scoped_refptr<content::ResourceRequestBody>& body,
|
||||
const scoped_refptr<network::ResourceRequestBody>& body,
|
||||
bool user_gesture,
|
||||
bool opener_suppressed,
|
||||
bool* no_javascript_access) {
|
||||
|
|
|
@ -95,7 +95,7 @@ class AtomBrowserClient : public brightray::BrowserClient,
|
|||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
const std::vector<std::string>& additional_features,
|
||||
const scoped_refptr<content::ResourceRequestBody>& body,
|
||||
const scoped_refptr<network::ResourceRequestBody>& body,
|
||||
bool user_gesture,
|
||||
bool opener_suppressed,
|
||||
bool* no_javascript_access) override;
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
#include "atom/common/native_mate_converters/value_converter.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
#include "content/public/common/context_menu_params.h"
|
||||
#include "content/public/common/resource_request_body.h"
|
||||
#include "native_mate/dictionary.h"
|
||||
#include "services/network/public/cpp/resource_request_body.h"
|
||||
|
||||
using content::ResourceRequestBody;
|
||||
using network::ResourceRequestBody;
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -251,7 +251,7 @@ bool Converter<scoped_refptr<ResourceRequestBody>>::FromV8(
|
|||
auto list = std::make_unique<base::ListValue>();
|
||||
if (!ConvertFromV8(isolate, val, list.get()))
|
||||
return false;
|
||||
*out = new content::ResourceRequestBody();
|
||||
*out = new network::ResourceRequestBody();
|
||||
for (size_t i = 0; i < list->GetSize(); ++i) {
|
||||
base::DictionaryValue* dict = nullptr;
|
||||
std::string type;
|
||||
|
|
|
@ -16,10 +16,13 @@
|
|||
|
||||
namespace content {
|
||||
struct ContextMenuParams;
|
||||
class ResourceRequestBody;
|
||||
class WebContents;
|
||||
} // namespace content
|
||||
|
||||
namespace network {
|
||||
class ResourceRequestBody;
|
||||
}
|
||||
|
||||
using ContextMenuParamsWithWebContents =
|
||||
std::pair<content::ContextMenuParams, content::WebContents*>;
|
||||
|
||||
|
@ -51,13 +54,13 @@ struct Converter<content::PermissionType> {
|
|||
};
|
||||
|
||||
template <>
|
||||
struct Converter<scoped_refptr<content::ResourceRequestBody>> {
|
||||
struct Converter<scoped_refptr<network::ResourceRequestBody>> {
|
||||
static v8::Local<v8::Value> ToV8(
|
||||
v8::Isolate* isolate,
|
||||
const scoped_refptr<content::ResourceRequestBody>& val);
|
||||
const scoped_refptr<network::ResourceRequestBody>& val);
|
||||
static bool FromV8(v8::Isolate* isolate,
|
||||
v8::Local<v8::Value> val,
|
||||
scoped_refptr<content::ResourceRequestBody>* out);
|
||||
scoped_refptr<network::ResourceRequestBody>* out);
|
||||
};
|
||||
|
||||
template <>
|
||||
|
|
Loading…
Reference in a new issue