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
|
@ -1458,7 +1458,7 @@ void NativeWindowMac::SetEscapeTouchBarItem(const mate::PersistentDictionary& it
|
||||||
}
|
}
|
||||||
|
|
||||||
void NativeWindowMac::OnInputEvent(const blink::WebInputEvent& event) {
|
void NativeWindowMac::OnInputEvent(const blink::WebInputEvent& event) {
|
||||||
switch (event.type) {
|
switch (event.type()) {
|
||||||
case blink::WebInputEvent::GestureScrollBegin:
|
case blink::WebInputEvent::GestureScrollBegin:
|
||||||
case blink::WebInputEvent::GestureScrollUpdate:
|
case blink::WebInputEvent::GestureScrollUpdate:
|
||||||
case blink::WebInputEvent::GestureScrollEnd:
|
case blink::WebInputEvent::GestureScrollEnd:
|
||||||
|
|
|
@ -187,7 +187,7 @@ NativeWindowViews::NativeWindowViews(
|
||||||
params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
|
params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
|
||||||
params.bounds = bounds;
|
params.bounds = bounds;
|
||||||
params.delegate = this;
|
params.delegate = this;
|
||||||
params.type = views::Widget::InitParams::Type::WINDOW;
|
params.type = views::Widget::InitParams::TYPE_WINDOW;
|
||||||
params.remove_standard_frame = !has_frame();
|
params.remove_standard_frame = !has_frame();
|
||||||
|
|
||||||
if (transparent())
|
if (transparent())
|
||||||
|
|
|
@ -185,7 +185,7 @@ std::unique_ptr<net::SourceStream> URLRequestAsarJob::SetUpSourceStream() {
|
||||||
// Bug 9936 - .svgz files needs to be decompressed.
|
// Bug 9936 - .svgz files needs to be decompressed.
|
||||||
return base::LowerCaseEqualsASCII(file_path_.Extension(), ".svgz")
|
return base::LowerCaseEqualsASCII(file_path_.Extension(), ".svgz")
|
||||||
? net::GzipSourceStream::Create(std::move(source),
|
? net::GzipSourceStream::Create(std::move(source),
|
||||||
net::SourceStream::Type::GZIP)
|
net::SourceStream::TYPE_GZIP)
|
||||||
: std::move(source);
|
: std::move(source);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ bool AtomURLRequestJobFactory::InterceptProtocol(
|
||||||
return false;
|
return false;
|
||||||
ProtocolHandler* original_protocol_handler = protocol_handler_map_[scheme];
|
ProtocolHandler* original_protocol_handler = protocol_handler_map_[scheme];
|
||||||
protocol_handler_map_[scheme] = protocol_handler.release();
|
protocol_handler_map_[scheme] = protocol_handler.release();
|
||||||
original_protocols_[scheme] = std::move(original_protocol_handler);
|
original_protocols_[scheme].reset(original_protocol_handler);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ bool AtomURLRequestJobFactory::UninterceptProtocol(const std::string& scheme) {
|
||||||
auto it = original_protocols_.find(scheme);
|
auto it = original_protocols_.find(scheme);
|
||||||
if (it == original_protocols_.end())
|
if (it == original_protocols_.end())
|
||||||
return false;
|
return false;
|
||||||
protocol_handler_map_[scheme] = std::move(it->second);
|
protocol_handler_map_[scheme] = it->second.release();
|
||||||
original_protocols_.erase(it);
|
original_protocols_.erase(it);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -79,7 +79,8 @@ bool AtomURLRequestJobFactory::HasProtocolHandler(
|
||||||
}
|
}
|
||||||
|
|
||||||
void AtomURLRequestJobFactory::Clear() {
|
void AtomURLRequestJobFactory::Clear() {
|
||||||
base::STLDeleteValues(&protocol_handler_map_);
|
for (auto& it : protocol_handler_map_)
|
||||||
|
delete it.second;
|
||||||
}
|
}
|
||||||
|
|
||||||
net::URLRequestJob* AtomURLRequestJobFactory::MaybeCreateJobWithProtocolHandler(
|
net::URLRequestJob* AtomURLRequestJobFactory::MaybeCreateJobWithProtocolHandler(
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "atom/common/atom_constants.h"
|
#include "atom/common/atom_constants.h"
|
||||||
|
#include "base/threading/sequenced_worker_pool.h"
|
||||||
|
|
||||||
namespace atom {
|
namespace atom {
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ NodeDebugger::NodeDebugger(v8::Isolate* isolate)
|
||||||
|
|
||||||
// Start a new IO thread.
|
// Start a new IO thread.
|
||||||
base::Thread::Options options;
|
base::Thread::Options options;
|
||||||
options.message_loop_type = base::MessageLoop::Type::IO;
|
options.message_loop_type = base::MessageLoop::TYPE_IO;
|
||||||
if (!thread_.StartWithOptions(options)) {
|
if (!thread_.StartWithOptions(options)) {
|
||||||
LOG(ERROR) << "Unable to start debugger thread";
|
LOG(ERROR) << "Unable to start debugger thread";
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
#include "atom/browser/osr/osr_output_device.h"
|
#include "atom/browser/osr/osr_output_device.h"
|
||||||
|
|
||||||
#include "third_party/skia/include/core/SkDevice.h"
|
#include "third_party/skia/src/core/SkDevice.h"
|
||||||
#include "ui/gfx/skia_util.h"
|
#include "ui/gfx/skia_util.h"
|
||||||
|
|
||||||
namespace atom {
|
namespace atom {
|
||||||
|
|
|
@ -73,7 +73,7 @@ void GenerateAcceleratorTable(AcceleratorTable* table,
|
||||||
int count = model->GetItemCount();
|
int count = model->GetItemCount();
|
||||||
for (int i = 0; i < count; ++i) {
|
for (int i = 0; i < count; ++i) {
|
||||||
atom::AtomMenuModel::ItemType type = model->GetTypeAt(i);
|
atom::AtomMenuModel::ItemType type = model->GetTypeAt(i);
|
||||||
if (type == atom::AtomMenuModel::Type::SUBMENU) {
|
if (type == atom::AtomMenuModel::TYPE_SUBMENU) {
|
||||||
auto submodel = model->GetSubmenuModelAt(i);
|
auto submodel = model->GetSubmenuModelAt(i);
|
||||||
GenerateAcceleratorTable(table, submodel);
|
GenerateAcceleratorTable(table, submodel);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -87,7 +87,7 @@ Role kRolesMap[] = {
|
||||||
|
|
||||||
const int count = model->GetItemCount();
|
const int count = model->GetItemCount();
|
||||||
for (int index = 0; index < count; index++) {
|
for (int index = 0; index < count; index++) {
|
||||||
if (model->GetTypeAt(index) == atom::AtomMenuModel::Type::SEPARATOR)
|
if (model->GetTypeAt(index) == atom::AtomMenuModel::TYPE_SEPARATOR)
|
||||||
[self addSeparatorToMenu:menu_ atIndex:index];
|
[self addSeparatorToMenu:menu_ atIndex:index];
|
||||||
else
|
else
|
||||||
[self addItemToMenu:menu_ atIndex:index fromModel:model];
|
[self addItemToMenu:menu_ atIndex:index fromModel:model];
|
||||||
|
@ -109,7 +109,7 @@ Role kRolesMap[] = {
|
||||||
|
|
||||||
const int count = model->GetItemCount();
|
const int count = model->GetItemCount();
|
||||||
for (int index = 0; index < count; index++) {
|
for (int index = 0; index < count; index++) {
|
||||||
if (model->GetTypeAt(index) == atom::AtomMenuModel::Type::SEPARATOR)
|
if (model->GetTypeAt(index) == atom::AtomMenuModel::TYPE_SEPARATOR)
|
||||||
[self addSeparatorToMenu:menu atIndex:index];
|
[self addSeparatorToMenu:menu atIndex:index];
|
||||||
else
|
else
|
||||||
[self addItemToMenu:menu atIndex:index fromModel:model];
|
[self addItemToMenu:menu atIndex:index fromModel:model];
|
||||||
|
@ -145,7 +145,7 @@ Role kRolesMap[] = {
|
||||||
[item setImage:icon.ToNSImage()];
|
[item setImage:icon.ToNSImage()];
|
||||||
|
|
||||||
atom::AtomMenuModel::ItemType type = model->GetTypeAt(index);
|
atom::AtomMenuModel::ItemType type = model->GetTypeAt(index);
|
||||||
if (type == atom::AtomMenuModel::Type::SUBMENU) {
|
if (type == atom::AtomMenuModel::TYPE_SUBMENU) {
|
||||||
// Recursively build a submenu from the sub-model at this index.
|
// Recursively build a submenu from the sub-model at this index.
|
||||||
[item setTarget:nil];
|
[item setTarget:nil];
|
||||||
[item setAction:nil];
|
[item setAction:nil];
|
||||||
|
|
|
@ -225,7 +225,7 @@ void GlobalMenuBarX11::BuildMenuFromModel(AtomMenuModel* model,
|
||||||
menuitem_property_set_bool(item, kPropertyVisible, model->IsVisibleAt(i));
|
menuitem_property_set_bool(item, kPropertyVisible, model->IsVisibleAt(i));
|
||||||
|
|
||||||
AtomMenuModel::ItemType type = model->GetTypeAt(i);
|
AtomMenuModel::ItemType type = model->GetTypeAt(i);
|
||||||
if (type == AtomMenuModel::Type::SEPARATOR) {
|
if (type == AtomMenuModel::TYPE_SEPARATOR) {
|
||||||
menuitem_property_set(item, kPropertyType, kTypeSeparator);
|
menuitem_property_set(item, kPropertyType, kTypeSeparator);
|
||||||
} else {
|
} else {
|
||||||
std::string label = ui::ConvertAcceleratorsFromWindowsStyle(
|
std::string label = ui::ConvertAcceleratorsFromWindowsStyle(
|
||||||
|
@ -236,7 +236,7 @@ void GlobalMenuBarX11::BuildMenuFromModel(AtomMenuModel* model,
|
||||||
g_object_set_data(G_OBJECT(item), "model", model);
|
g_object_set_data(G_OBJECT(item), "model", model);
|
||||||
SetMenuItemID(item, i);
|
SetMenuItemID(item, i);
|
||||||
|
|
||||||
if (type == AtomMenuModel::Type::SUBMENU) {
|
if (type == AtomMenuModel::TYPE_SUBMENU) {
|
||||||
menuitem_property_set(item, kPropertyChildrenDisplay, kDisplaySubmenu);
|
menuitem_property_set(item, kPropertyChildrenDisplay, kDisplaySubmenu);
|
||||||
g_signal_connect(item, "about-to-show",
|
g_signal_connect(item, "about-to-show",
|
||||||
G_CALLBACK(OnSubMenuShowThunk), this);
|
G_CALLBACK(OnSubMenuShowThunk), this);
|
||||||
|
@ -248,10 +248,10 @@ void GlobalMenuBarX11::BuildMenuFromModel(AtomMenuModel* model,
|
||||||
g_signal_connect(item, "item-activated",
|
g_signal_connect(item, "item-activated",
|
||||||
G_CALLBACK(OnItemActivatedThunk), this);
|
G_CALLBACK(OnItemActivatedThunk), this);
|
||||||
|
|
||||||
if (type == AtomMenuModel::Type::CHECK ||
|
if (type == AtomMenuModel::TYPE_CHECK ||
|
||||||
type == AtomMenuModel::Type::RADIO) {
|
type == AtomMenuModel::TYPE_RADIO) {
|
||||||
menuitem_property_set(item, kPropertyToggleType,
|
menuitem_property_set(item, kPropertyToggleType,
|
||||||
type == AtomMenuModel::Type::CHECK ? kToggleCheck : kToggleRadio);
|
type == AtomMenuModel::TYPE_CHECK ? kToggleCheck : kToggleRadio);
|
||||||
menuitem_property_set_int(item, kPropertyToggleState,
|
menuitem_property_set_int(item, kPropertyToggleState,
|
||||||
model->IsItemCheckedAt(i));
|
model->IsItemCheckedAt(i));
|
||||||
}
|
}
|
||||||
|
|
|
@ -120,7 +120,7 @@ bool MenuBar::GetMenuButtonFromScreenPoint(const gfx::Point& point,
|
||||||
for (int i = 0; i < child_count(); ++i) {
|
for (int i = 0; i < child_count(); ++i) {
|
||||||
views::View* view = child_at(i);
|
views::View* view = child_at(i);
|
||||||
if (view->bounds().Contains(location) &&
|
if (view->bounds().Contains(location) &&
|
||||||
(menu_model_->GetTypeAt(i) == AtomMenuModel::Type::SUBMENU)) {
|
(menu_model_->GetTypeAt(i) == AtomMenuModel::TYPE_SUBMENU)) {
|
||||||
*menu_model = menu_model_->GetSubmenuModelAt(i);
|
*menu_model = menu_model_->GetSubmenuModelAt(i);
|
||||||
*button = static_cast<views::MenuButton*>(view);
|
*button = static_cast<views::MenuButton*>(view);
|
||||||
return true;
|
return true;
|
||||||
|
@ -148,7 +148,7 @@ void MenuBar::OnMenuButtonClicked(views::MenuButton* source,
|
||||||
|
|
||||||
int id = source->tag();
|
int id = source->tag();
|
||||||
AtomMenuModel::ItemType type = menu_model_->GetTypeAt(id);
|
AtomMenuModel::ItemType type = menu_model_->GetTypeAt(id);
|
||||||
if (type != AtomMenuModel::Type::SUBMENU) {
|
if (type != AtomMenuModel::TYPE_SUBMENU) {
|
||||||
menu_model_->ActivatedAt(id, 0);
|
menu_model_->ActivatedAt(id, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,9 +33,8 @@ void CreateResponseHeadersDictionary(const net::HttpResponseHeaders* headers,
|
||||||
while (headers->EnumerateHeaderLines(&iter, &header_name, &header_value)) {
|
while (headers->EnumerateHeaderLines(&iter, &header_name, &header_value)) {
|
||||||
base::Value* existing_value = nullptr;
|
base::Value* existing_value = nullptr;
|
||||||
if (result->Get(header_name, &existing_value)) {
|
if (result->Get(header_name, &existing_value)) {
|
||||||
base::StringValue* existing_string_value =
|
std::string src = existing_value->GetString();
|
||||||
static_cast<base::StringValue*>(existing_value);
|
result->SetString(header_name, src + ", " + header_value);
|
||||||
existing_string_value->GetString()->append(", ").append(header_value);
|
|
||||||
} else {
|
} else {
|
||||||
result->SetString(header_name, header_value);
|
result->SetString(header_name, header_value);
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
#include "content/public/browser/native_web_keyboard_event.h"
|
#include "content/public/browser/native_web_keyboard_event.h"
|
||||||
#include "native_mate/dictionary.h"
|
#include "native_mate/dictionary.h"
|
||||||
#include "third_party/WebKit/public/platform/WebInputEvent.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/WebDeviceEmulationParams.h"
|
||||||
#include "third_party/WebKit/public/web/WebFindOptions.h"
|
#include "third_party/WebKit/public/web/WebFindOptions.h"
|
||||||
#include "ui/base/clipboard/clipboard.h"
|
#include "ui/base/clipboard/clipboard.h"
|
||||||
|
|
|
@ -213,13 +213,13 @@ Converter<scoped_refptr<ResourceRequestBodyImpl>>::ToV8(
|
||||||
std::unique_ptr<base::DictionaryValue> post_data_dict(
|
std::unique_ptr<base::DictionaryValue> post_data_dict(
|
||||||
new base::DictionaryValue);
|
new base::DictionaryValue);
|
||||||
auto type = element.type();
|
auto type = element.type();
|
||||||
if (type == ResourceRequestBodyImpl::Element::Type::BYTES) {
|
if (type == ResourceRequestBodyImpl::Element::TYPE_BYTES) {
|
||||||
std::unique_ptr<base::Value> bytes(
|
std::unique_ptr<base::Value> bytes(
|
||||||
base::BinaryValue::CreateWithCopiedBuffer(
|
base::BinaryValue::CreateWithCopiedBuffer(
|
||||||
element.bytes(), static_cast<size_t>(element.length())));
|
element.bytes(), static_cast<size_t>(element.length())));
|
||||||
post_data_dict->SetString("type", "rawData");
|
post_data_dict->SetString("type", "rawData");
|
||||||
post_data_dict->Set("bytes", std::move(bytes));
|
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->SetString("type", "file");
|
||||||
post_data_dict->SetStringWithoutPathExpansion(
|
post_data_dict->SetStringWithoutPathExpansion(
|
||||||
"filePath", element.path().AsUTF8Unsafe());
|
"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->SetInteger("length", static_cast<int>(element.length()));
|
||||||
post_data_dict->SetDouble(
|
post_data_dict->SetDouble(
|
||||||
"modificationTime", element.expected_modification_time().ToDoubleT());
|
"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->SetString("type", "fileSystem");
|
||||||
post_data_dict->SetStringWithoutPathExpansion(
|
post_data_dict->SetStringWithoutPathExpansion(
|
||||||
"fileSystemURL", element.filesystem_url().spec());
|
"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->SetInteger("length", static_cast<int>(element.length()));
|
||||||
post_data_dict->SetDouble(
|
post_data_dict->SetDouble(
|
||||||
"modificationTime", element.expected_modification_time().ToDoubleT());
|
"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("type", "blob");
|
||||||
post_data_dict->SetString("blobUUID", element.blob_uuid());
|
post_data_dict->SetString("blobUUID", element.blob_uuid());
|
||||||
}
|
}
|
||||||
|
|
|
@ -167,7 +167,7 @@ base::Value* V8ValueConverter::FromV8Value(
|
||||||
v8::Local<v8::Value> V8ValueConverter::ToV8ValueImpl(
|
v8::Local<v8::Value> V8ValueConverter::ToV8ValueImpl(
|
||||||
v8::Isolate* isolate, const base::Value* value) const {
|
v8::Isolate* isolate, const base::Value* value) const {
|
||||||
switch (value->GetType()) {
|
switch (value->GetType()) {
|
||||||
case base::Value::Type::NULL:
|
case base::Value::Type::NONE:
|
||||||
return v8::Null(isolate);
|
return v8::Null(isolate);
|
||||||
|
|
||||||
case base::Value::Type::BOOLEAN: {
|
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
|
// 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.
|
// on the browser which doesn't additionally check for null will fail.
|
||||||
// We can avoid all bugs related to this by stripping null.
|
// 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;
|
continue;
|
||||||
|
|
||||||
result->SetWithoutPathExpansion(std::string(*name_utf8, name_utf8.length()),
|
result->SetWithoutPathExpansion(std::string(*name_utf8, name_utf8.length()),
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#include "atom/renderer/guest_view_container.h"
|
#include "atom/renderer/guest_view_container.h"
|
||||||
#include "native_mate/handle.h"
|
#include "native_mate/handle.h"
|
||||||
#include "native_mate/wrappable.h"
|
#include "native_mate/wrappable.h"
|
||||||
#include "third_party/WebKit/public/web/WebCache.h"
|
#include "third_party/WebKit/public/platform/WebCache.h"
|
||||||
|
|
||||||
namespace blink {
|
namespace blink {
|
||||||
class WebLocalFrame;
|
class WebLocalFrame;
|
||||||
|
|
Loading…
Reference in a new issue