Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
qq_34031325
engine
提交
ebb753ae
E
engine
项目概览
qq_34031325
/
engine
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
engine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ebb753ae
编写于
12月 29, 2015
作者:
A
Adam Barth
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2202 from abarth/cleanup_bindings
Remove unused C++ code
上级
8fc63eb2
c5fee9d9
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
1 addition
and
198 deletion
+1
-198
sky/engine/bindings/BUILD.gn
sky/engine/bindings/BUILD.gn
+0
-5
sky/engine/bindings/dart_callback.cc
sky/engine/bindings/dart_callback.cc
+0
-40
sky/engine/bindings/dart_callback.h
sky/engine/bindings/dart_callback.h
+0
-30
sky/engine/bindings/nullable.h
sky/engine/bindings/nullable.h
+0
-54
sky/engine/bindings/scheduled_action.cc
sky/engine/bindings/scheduled_action.cc
+0
-30
sky/engine/bindings/scheduled_action.h
sky/engine/bindings/scheduled_action.h
+0
-37
sky/engine/core/dart/painting.dart
sky/engine/core/dart/painting.dart
+1
-2
未找到文件。
sky/engine/bindings/BUILD.gn
浏览文件 @
ebb753ae
...
...
@@ -8,8 +8,6 @@ import("//sky/engine/core/core.gni")
source_set("bindings") {
sources = [
"dart_callback.cc",
"dart_callback.h",
"dart_mojo_internal.cc",
"dart_mojo_internal.h",
"dart_runtime_hooks.cc",
...
...
@@ -22,9 +20,6 @@ source_set("bindings") {
"exception_state_placeholder.h",
"exception_state.cc",
"exception_state.h",
"nullable.h",
"scheduled_action.cc",
"scheduled_action.h",
]
defines = [ "DART_IO_SECURE_SOCKET_DISABLED" ]
...
...
sky/engine/bindings/dart_callback.cc
已删除
100644 → 0
浏览文件 @
8fc63eb2
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "sky/engine/bindings/dart_callback.h"
#include "sky/engine/tonic/dart_converter.h"
#include "sky/engine/tonic/dart_error.h"
#include "sky/engine/tonic/dart_invoke.h"
#include "sky/engine/tonic/dart_state.h"
namespace
blink
{
DartCallback
::
DartCallback
(
DartState
*
dart_state
,
Dart_Handle
callback
,
Dart_Handle
&
exception
)
:
callback_
(
dart_state
,
callback
)
{
if
(
!
Dart_IsClosure
(
callback
))
{
exception
=
ToDart
(
"Callback must be a function"
);
callback_
.
Clear
();
}
}
DartCallback
::~
DartCallback
()
{
}
bool
DartCallback
::
IsIsolateAlive
()
const
{
return
!!
callback_
.
dart_state
();
}
Dart_Isolate
DartCallback
::
GetIsolate
()
const
{
return
callback_
.
dart_state
()
->
isolate
();
}
bool
DartCallback
::
handleEvent
(
int
argc
,
Dart_Handle
*
argv
)
{
DartInvokeAppClosure
(
callback_
.
value
(),
argc
,
argv
);
return
true
;
}
}
// namespace blink
sky/engine/bindings/dart_callback.h
已删除
100644 → 0
浏览文件 @
8fc63eb2
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SKY_ENGINE_BINDINGS_DART_CALLBACK_H_
#define SKY_ENGINE_BINDINGS_DART_CALLBACK_H_
#include "dart/runtime/include/dart_api.h"
#include "sky/engine/tonic/dart_persistent_value.h"
namespace
blink
{
class
DartCallback
{
public:
DartCallback
(
DartState
*
dart_state
,
Dart_Handle
callback
,
Dart_Handle
&
exception
);
~
DartCallback
();
bool
handleEvent
(
int
argc
,
Dart_Handle
*
argv
);
bool
IsIsolateAlive
()
const
;
Dart_Isolate
GetIsolate
()
const
;
private:
DartPersistentValue
callback_
;
};
}
#endif // SKY_ENGINE_BINDINGS_DART_CALLBACK_H_
sky/engine/bindings/nullable.h
已删除
100644 → 0
浏览文件 @
8fc63eb2
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SKY_ENGINE_BINDINGS_NULLABLE_H_
#define SKY_ENGINE_BINDINGS_NULLABLE_H_
#include "base/logging.h"
namespace
blink
{
template
<
typename
T
>
class
Nullable
{
public:
Nullable
()
:
value_
(),
is_null_
(
true
)
{}
Nullable
(
const
T
&
value
)
:
value_
(
value
),
is_null_
(
false
)
{}
Nullable
(
const
Nullable
&
other
)
:
value_
(
other
.
value_
),
is_null_
(
other
.
is_null_
)
{}
Nullable
&
operator
=
(
const
Nullable
&
other
)
=
default
;
void
set
(
const
T
&
value
)
{
value_
=
value
;
is_null_
=
false
;
}
const
T
&
get
()
const
{
DCHECK
(
!
is_null_
);
return
value_
;
}
T
&
get
()
{
DCHECK
(
!
is_null_
);
return
value_
;
}
bool
is_null
()
const
{
return
is_null_
;
}
// See comment in RefPtr.h about what UnspecifiedBoolType is.
typedef
const
T
*
UnspecifiedBoolType
;
operator
UnspecifiedBoolType
()
const
{
return
is_null_
?
0
:
&
value_
;
}
bool
operator
==
(
const
Nullable
&
other
)
const
{
return
(
is_null_
&&
other
.
is_null_
)
||
(
!
is_null_
&&
!
other
.
is_null_
&&
value_
==
other
.
value_
);
}
private:
T
value_
;
bool
is_null_
;
};
}
// namespace blink
#endif // SKY_ENGINE_BINDINGS_NULLABLE_H_
sky/engine/bindings/scheduled_action.cc
已删除
100644 → 0
浏览文件 @
8fc63eb2
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "sky/engine/bindings/scheduled_action.h"
#include "sky/engine/tonic/dart_api_scope.h"
#include "sky/engine/tonic/dart_error.h"
#include "sky/engine/tonic/dart_invoke.h"
#include "sky/engine/tonic/dart_isolate_scope.h"
namespace
blink
{
ScheduledAction
::
ScheduledAction
(
DartState
*
dart_state
,
Dart_Handle
closure
)
:
closure_
(
dart_state
,
closure
)
{
DCHECK
(
Dart_IsClosure
(
closure
));
}
ScheduledAction
::~
ScheduledAction
()
{
}
void
ScheduledAction
::
Execute
()
{
if
(
!
closure_
.
dart_state
())
return
;
DartIsolateScope
scope
(
closure_
.
dart_state
()
->
isolate
());
DartApiScope
api_scope
;
DartInvokeAppClosure
(
closure_
.
value
(),
0
,
nullptr
);
}
}
// namespace blink
sky/engine/bindings/scheduled_action.h
已删除
100644 → 0
浏览文件 @
8fc63eb2
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SKY_ENGINE_BINDINGS_SCHEDULED_ACTION_H_
#define SKY_ENGINE_BINDINGS_SCHEDULED_ACTION_H_
#include "dart/runtime/include/dart_api.h"
#include "sky/engine/tonic/dart_persistent_value.h"
#include "sky/engine/tonic/dart_state.h"
#include "sky/engine/wtf/RefPtr.h"
#include "sky/engine/wtf/PassOwnPtr.h"
namespace
blink
{
class
ExecutionContext
;
class
ScheduledAction
{
public:
static
PassOwnPtr
<
ScheduledAction
>
Create
(
DartState
*
dart_state
,
Dart_Handle
closure
)
{
return
adoptPtr
(
new
ScheduledAction
(
dart_state
,
closure
));
}
~
ScheduledAction
();
void
Execute
();
private:
ScheduledAction
(
DartState
*
dart_state
,
Dart_Handle
closure
);
DartPersistentValue
closure_
;
};
}
// namespace blink
#endif // SKY_ENGINE_BINDINGS_SCHEDULED_ACTION_H_
sky/engine/core/dart/painting.dart
浏览文件 @
ebb753ae
...
...
@@ -130,8 +130,7 @@ enum TileMode {
void
_validateColorStops
(
List
<
Color
>
colors
,
List
<
double
>
colorStops
)
{
if
(
colorStops
!=
null
&&
(
colors
==
null
||
colors
.
length
!=
colorStops
.
length
))
{
throw
new
ArgumentError
(
"[colors] and [colorStops] parameters must be equal length."
);
throw
new
ArgumentError
(
"[colors] and [colorStops] parameters must be equal length."
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录