Update to API changes of Chrome 47

This commit is contained in:
Cheng Zhao 2015-12-07 19:56:23 +08:00
parent 766bbfcb05
commit 73e7773d84
46 changed files with 113 additions and 239 deletions

View file

@ -45,7 +45,7 @@ template<>
struct Converter<blink::WebInputEvent::Type> {
static bool FromV8(v8::Isolate* isolate, v8::Handle<v8::Value> val,
blink::WebInputEvent::Type* out) {
std::string type = base::StringToLowerASCII(V8ToString(val));
std::string type = base::ToLowerASCII(V8ToString(val));
if (type == "mousedown")
*out = blink::WebInputEvent::MouseDown;
else if (type == "mouseup")
@ -82,7 +82,7 @@ template<>
struct Converter<blink::WebMouseEvent::Button> {
static bool FromV8(v8::Isolate* isolate, v8::Handle<v8::Value> val,
blink::WebMouseEvent::Button* out) {
std::string button = base::StringToLowerASCII(V8ToString(val));
std::string button = base::ToLowerASCII(V8ToString(val));
if (button == "left")
*out = blink::WebMouseEvent::Button::ButtonLeft;
else if (button == "middle")
@ -97,7 +97,7 @@ template<>
struct Converter<blink::WebInputEvent::Modifiers> {
static bool FromV8(v8::Isolate* isolate, v8::Handle<v8::Value> val,
blink::WebInputEvent::Modifiers* out) {
std::string modifier = base::StringToLowerASCII(V8ToString(val));
std::string modifier = base::ToLowerASCII(V8ToString(val));
if (modifier == "shift")
*out = blink::WebInputEvent::ShiftKey;
else if (modifier == "control" || modifier == "ctrl")
@ -166,7 +166,7 @@ bool Converter<blink::WebKeyboardEvent>::FromV8(
out->windowsKeyCode = atom::KeyboardCodeFromCharCode(code, &shifted);
else if (dict.Get("keyCode", &identifier))
out->windowsKeyCode = atom::KeyboardCodeFromKeyIdentifier(
base::StringToLowerASCII(identifier));
base::ToLowerASCII(identifier));
else
return false;
@ -263,7 +263,7 @@ bool Converter<blink::WebDeviceEmulationParams>::FromV8(
std::string screen_position;
if (dict.Get("screenPosition", &screen_position)) {
screen_position = base::StringToLowerASCII(screen_position);
screen_position = base::ToLowerASCII(screen_position);
if (screen_position == "mobile")
out->screenPosition = blink::WebDeviceEmulationParams::Mobile;
else if (screen_position == "desktop")