Fix more API changes due to name changes
This commit is contained in:
parent
50e3bfa764
commit
6be10ffef2
16 changed files with 30 additions and 30 deletions
|
@ -14,7 +14,6 @@
|
|||
#include "content/public/browser/native_web_keyboard_event.h"
|
||||
#include "native_mate/dictionary.h"
|
||||
#include "third_party/WebKit/public/platform/WebInputEvent.h"
|
||||
#include "third_party/WebKit/public/web/WebCache.h"
|
||||
#include "third_party/WebKit/public/web/WebDeviceEmulationParams.h"
|
||||
#include "third_party/WebKit/public/web/WebFindOptions.h"
|
||||
#include "ui/base/clipboard/clipboard.h"
|
||||
|
|
|
@ -213,13 +213,13 @@ Converter<scoped_refptr<ResourceRequestBodyImpl>>::ToV8(
|
|||
std::unique_ptr<base::DictionaryValue> post_data_dict(
|
||||
new base::DictionaryValue);
|
||||
auto type = element.type();
|
||||
if (type == ResourceRequestBodyImpl::Element::Type::BYTES) {
|
||||
if (type == ResourceRequestBodyImpl::Element::TYPE_BYTES) {
|
||||
std::unique_ptr<base::Value> bytes(
|
||||
base::BinaryValue::CreateWithCopiedBuffer(
|
||||
element.bytes(), static_cast<size_t>(element.length())));
|
||||
post_data_dict->SetString("type", "rawData");
|
||||
post_data_dict->Set("bytes", std::move(bytes));
|
||||
} else if (type == ResourceRequestBodyImpl::Element::Type::FILE) {
|
||||
} else if (type == ResourceRequestBodyImpl::Element::TYPE_FILE) {
|
||||
post_data_dict->SetString("type", "file");
|
||||
post_data_dict->SetStringWithoutPathExpansion(
|
||||
"filePath", element.path().AsUTF8Unsafe());
|
||||
|
@ -227,7 +227,7 @@ Converter<scoped_refptr<ResourceRequestBodyImpl>>::ToV8(
|
|||
post_data_dict->SetInteger("length", static_cast<int>(element.length()));
|
||||
post_data_dict->SetDouble(
|
||||
"modificationTime", element.expected_modification_time().ToDoubleT());
|
||||
} else if (type == ResourceRequestBodyImpl::Element::Type::FILE_FILESYSTEM) {
|
||||
} else if (type == ResourceRequestBodyImpl::Element::TYPE_FILE_FILESYSTEM) {
|
||||
post_data_dict->SetString("type", "fileSystem");
|
||||
post_data_dict->SetStringWithoutPathExpansion(
|
||||
"fileSystemURL", element.filesystem_url().spec());
|
||||
|
@ -235,7 +235,7 @@ Converter<scoped_refptr<ResourceRequestBodyImpl>>::ToV8(
|
|||
post_data_dict->SetInteger("length", static_cast<int>(element.length()));
|
||||
post_data_dict->SetDouble(
|
||||
"modificationTime", element.expected_modification_time().ToDoubleT());
|
||||
} else if (type == ResourceRequestBodyImpl::Element::Type::BLOB) {
|
||||
} else if (type == ResourceRequestBodyImpl::Element::TYPE_BLOB) {
|
||||
post_data_dict->SetString("type", "blob");
|
||||
post_data_dict->SetString("blobUUID", element.blob_uuid());
|
||||
}
|
||||
|
|
|
@ -167,7 +167,7 @@ base::Value* V8ValueConverter::FromV8Value(
|
|||
v8::Local<v8::Value> V8ValueConverter::ToV8ValueImpl(
|
||||
v8::Isolate* isolate, const base::Value* value) const {
|
||||
switch (value->GetType()) {
|
||||
case base::Value::Type::NULL:
|
||||
case base::Value::Type::NONE:
|
||||
return v8::Null(isolate);
|
||||
|
||||
case base::Value::Type::BOOLEAN: {
|
||||
|
@ -490,7 +490,7 @@ base::Value* V8ValueConverter::FromV8Object(
|
|||
// there *is* a "windowId" property, but since it should be an int, code
|
||||
// on the browser which doesn't additionally check for null will fail.
|
||||
// We can avoid all bugs related to this by stripping null.
|
||||
if (strip_null_from_objects_ && child->IsType(base::Value::Type::NULL))
|
||||
if (strip_null_from_objects_ && child->IsType(base::Value::Type::NONE))
|
||||
continue;
|
||||
|
||||
result->SetWithoutPathExpansion(std::string(*name_utf8, name_utf8.length()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue