Update to API changes of Chrome 52

This commit is contained in:
Cheng Zhao 2016-07-04 15:08:55 +09:00
parent eb378bef3a
commit 1ba3907038
74 changed files with 304 additions and 176 deletions

View file

@ -81,7 +81,7 @@ bool AddImageSkiaRep(gfx::ImageSkia* image,
// Try PNG first.
if (!gfx::PNGCodec::Decode(data, size, decoded.get()))
// Try JPEG.
decoded.reset(gfx::JPEGCodec::Decode(data, size));
decoded = gfx::JPEGCodec::Decode(data, size);
if (!decoded)
return false;

View file

@ -6,7 +6,6 @@
#include "atom/common/api/locker.h"
#include "atom/common/node_includes.h"
#include "base/memory/scoped_ptr.h"
namespace mate {

View file

@ -5,12 +5,12 @@
#ifndef ATOM_COMMON_ASAR_ARCHIVE_H_
#define ATOM_COMMON_ASAR_ARCHIVE_H_
#include <memory>
#include <vector>
#include "base/containers/scoped_ptr_hash_map.h"
#include "base/files/file.h"
#include "base/files/file_path.h"
#include "base/memory/scoped_ptr.h"
namespace base {
class DictionaryValue;

View file

@ -5,12 +5,12 @@
#ifndef ATOM_COMMON_CRASH_REPORTER_CRASH_REPORTER_LINUX_H_
#define ATOM_COMMON_CRASH_REPORTER_CRASH_REPORTER_LINUX_H_
#include <memory>
#include <string>
#include "atom/common/crash_reporter/crash_reporter.h"
#include "atom/common/crash_reporter/linux/crash_dump_handler.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
namespace base {
template <typename T> struct DefaultSingletonTraits;

View file

@ -10,7 +10,6 @@
#include "atom/common/crash_reporter/crash_reporter.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/string_piece.h"
#include "vendor/crashpad/client/simple_string_dictionary.h"

View file

@ -10,7 +10,6 @@
#include "atom/common/crash_reporter/crash_reporter.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "vendor/breakpad/src/client/windows/handler/exception_handler.h"
namespace base {

View file

@ -7,8 +7,9 @@
#include "native_mate/dictionary.h"
#include "ui/gfx/geometry/point.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/screen.h"
#include "ui/gfx/geometry/size.h"
#include "ui/display/display.h"
#include "ui/display/screen.h"
namespace mate {
@ -82,13 +83,13 @@ bool Converter<gfx::Rect>::FromV8(v8::Isolate* isolate,
}
template<>
struct Converter<gfx::Display::TouchSupport> {
struct Converter<display::Display::TouchSupport> {
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
const gfx::Display::TouchSupport& val) {
const display::Display::TouchSupport& val) {
switch (val) {
case gfx::Display::TOUCH_SUPPORT_AVAILABLE:
case display::Display::TOUCH_SUPPORT_AVAILABLE:
return StringToV8(isolate, "available");
case gfx::Display::TOUCH_SUPPORT_UNAVAILABLE:
case display::Display::TOUCH_SUPPORT_UNAVAILABLE:
return StringToV8(isolate, "unavailable");
default:
return StringToV8(isolate, "unknown");
@ -96,8 +97,8 @@ struct Converter<gfx::Display::TouchSupport> {
}
};
v8::Local<v8::Value> Converter<gfx::Display>::ToV8(v8::Isolate* isolate,
const gfx::Display& val) {
v8::Local<v8::Value> Converter<display::Display>::ToV8(v8::Isolate* isolate,
const display::Display& val) {
mate::Dictionary dict = mate::Dictionary::CreateEmpty(isolate);
dict.SetHidden("simple", true);
dict.Set("id", val.id());

View file

@ -7,11 +7,14 @@
#include "native_mate/converter.h"
namespace display {
class Display;
}
namespace gfx {
class Point;
class Size;
class Rect;
class Display;
}
namespace mate {
@ -44,12 +47,12 @@ struct Converter<gfx::Rect> {
};
template<>
struct Converter<gfx::Display> {
struct Converter<display::Display> {
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
const gfx::Display& val);
const display::Display& val);
static bool FromV8(v8::Isolate* isolate,
v8::Local<v8::Value> val,
gfx::Display* out);
display::Display* out);
};
} // namespace mate

View file

@ -5,11 +5,11 @@
#include "atom/common/native_mate_converters/v8_value_converter.h"
#include <map>
#include <memory>
#include <string>
#include <utility>
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/values.h"
#include "native_mate/dictionary.h"
#include "vendor/node/src/node_buffer.h"