Fix cpplint warnings
This commit is contained in:
parent
2234307d41
commit
7459581d13
4 changed files with 17 additions and 21 deletions
|
@ -389,14 +389,12 @@ v8::Local<v8::Value> Converter<blink::WebCache::ResourceTypeStat>::ToV8(
|
|||
v8::Isolate* isolate,
|
||||
const blink::WebCache::ResourceTypeStat& stat) {
|
||||
mate::Dictionary dict = mate::Dictionary::CreateEmpty(isolate);
|
||||
|
||||
dict.Set("count", (uint32_t)stat.count);
|
||||
dict.Set("size", (double)stat.size);
|
||||
dict.Set("liveSize", (double)stat.liveSize);
|
||||
dict.Set("decodedSize", (double)stat.decodedSize);
|
||||
dict.Set("purgedSize", (double)stat.purgedSize);
|
||||
dict.Set("purgeableSize", (double)stat.purgeableSize);
|
||||
|
||||
dict.Set("count", static_cast<uint32_t>(stat.count));
|
||||
dict.Set("size", static_cast<double>(stat.size));
|
||||
dict.Set("liveSize", static_cast<double>(stat.liveSize));
|
||||
dict.Set("decodedSize", static_cast<double>(stat.decodedSize));
|
||||
dict.Set("purgedSize", static_cast<double>(stat.purgedSize));
|
||||
dict.Set("purgeableSize", static_cast<double>(stat.purgeableSize));
|
||||
return dict.GetHandle();
|
||||
}
|
||||
|
||||
|
@ -404,14 +402,12 @@ v8::Local<v8::Value> Converter<blink::WebCache::ResourceTypeStats>::ToV8(
|
|||
v8::Isolate* isolate,
|
||||
const blink::WebCache::ResourceTypeStats& stats) {
|
||||
mate::Dictionary dict = mate::Dictionary::CreateEmpty(isolate);
|
||||
|
||||
dict.Set("images", mate::ConvertToV8(isolate, stats.images));
|
||||
dict.Set("scripts", mate::ConvertToV8(isolate, stats.scripts));
|
||||
dict.Set("cssStyleSheets", mate::ConvertToV8(isolate, stats.cssStyleSheets));
|
||||
dict.Set("xslStyleSheets", mate::ConvertToV8(isolate, stats.xslStyleSheets));
|
||||
dict.Set("fonts", mate::ConvertToV8(isolate, stats.fonts));
|
||||
dict.Set("other", mate::ConvertToV8(isolate, stats.other));
|
||||
|
||||
return dict.GetHandle();
|
||||
}
|
||||
|
||||
|
|
|
@ -101,22 +101,23 @@ struct Converter<blink::WebContextMenuData::InputFieldType> {
|
|||
const blink::WebContextMenuData::InputFieldType& in);
|
||||
};
|
||||
|
||||
v8::Local<v8::Value> EditFlagsToV8(v8::Isolate* isolate, int editFlags);
|
||||
|
||||
v8::Local<v8::Value> MediaFlagsToV8(v8::Isolate* isolate, int mediaFlags);
|
||||
|
||||
template<>
|
||||
struct Converter<blink::WebCache::ResourceTypeStat> {
|
||||
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
|
||||
const blink::WebCache::ResourceTypeStat& stat);
|
||||
static v8::Local<v8::Value> ToV8(
|
||||
v8::Isolate* isolate,
|
||||
const blink::WebCache::ResourceTypeStat& stat);
|
||||
};
|
||||
|
||||
template<>
|
||||
struct Converter<blink::WebCache::ResourceTypeStats> {
|
||||
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
|
||||
const blink::WebCache::ResourceTypeStats& stats);
|
||||
static v8::Local<v8::Value> ToV8(
|
||||
v8::Isolate* isolate,
|
||||
const blink::WebCache::ResourceTypeStats& stats);
|
||||
};
|
||||
|
||||
v8::Local<v8::Value> EditFlagsToV8(v8::Isolate* isolate, int editFlags);
|
||||
v8::Local<v8::Value> MediaFlagsToV8(v8::Isolate* isolate, int mediaFlags);
|
||||
|
||||
} // namespace mate
|
||||
|
||||
#endif // ATOM_COMMON_NATIVE_MATE_CONVERTERS_BLINK_CONVERTER_H_
|
||||
|
|
|
@ -171,9 +171,9 @@ mate::Handle<WebFrame> WebFrame::Create(v8::Isolate* isolate) {
|
|||
return mate::CreateHandle(isolate, new WebFrame(isolate));
|
||||
}
|
||||
|
||||
blink::WebCache::ResourceTypeStats WebFrame::GetResourceUsage(v8::Isolate* isolate) {
|
||||
blink::WebCache::ResourceTypeStats WebFrame::GetResourceUsage(
|
||||
v8::Isolate* isolate) {
|
||||
blink::WebCache::ResourceTypeStats stats;
|
||||
|
||||
blink::WebCache::getResourceTypeStats(&stats);
|
||||
return stats;
|
||||
}
|
||||
|
|
|
@ -106,7 +106,6 @@ In the browser window some HTML APIs like `requestFullScreen` can only be
|
|||
invoked by a gesture from the user. Setting `userGesture` to `true` will remove
|
||||
this limitation.
|
||||
|
||||
|
||||
### `webFrame.getResourceUsage()`
|
||||
|
||||
Returns more detailed memory usage information in kilobytes of Blink's internal
|
||||
|
|
Loading…
Reference in a new issue