Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
sxychenjing
engine
提交
b672f6bc
E
engine
项目概览
sxychenjing
/
engine
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
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,发现更多精彩内容 >>
提交
b672f6bc
编写于
7月 30, 2015
作者:
E
Eric Seidel
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Make it possible to pass a URL via command line to Mac SkyShell.app
@chinmaygarde
上级
0f5799c6
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
18 addition
and
1 deletion
+18
-1
sky/services/ns_net/url_loader_impl.mm
sky/services/ns_net/url_loader_impl.mm
+2
-0
sky/shell/mac/sky_window.mm
sky/shell/mac/sky_window.mm
+16
-1
未找到文件。
sky/services/ns_net/url_loader_impl.mm
浏览文件 @
b672f6bc
...
...
@@ -43,6 +43,8 @@
_response
.
reset
();
}
uint32_t
length
=
data
.
length
;
// TODO(eseidel): This can't work. The data pipe could be full, we need to
// write an async writter for filling the pipe and use it here.
MojoResult
result
=
WriteDataRaw
(
_producer
.
get
(),
data
.
bytes
,
&
length
,
MOJO_WRITE_DATA_FLAG_ALL_OR_NONE
);
// FIXME(csg): Handle buffers in case of failures
...
...
sky/shell/mac/sky_window.mm
浏览文件 @
b672f6bc
...
...
@@ -3,14 +3,16 @@
// found in the LICENSE file.
#import "sky_window.h"
#include "base/command_line.h"
#include "base/time/time.h"
#include "mojo/public/cpp/bindings/interface_request.h"
#include "sky/services/engine/input_event.mojom.h"
#include "sky/shell/mac/platform_view_mac.h"
#include "sky/shell/shell_view.h"
#include "sky/shell/shell.h"
#include "sky/shell/shell_view.h"
#include "sky/shell/ui_delegate.h"
@interface
SkyWindow
()
<
NSWindowDelegate
>
@property
(
assign
)
IBOutlet
NSOpenGLView
*
renderSurface
;
...
...
@@ -74,10 +76,23 @@ static inline sky::EventType EventTypeFromNSEventPhase(NSEventPhase phase) {
return
[[
NSBundle
mainBundle
]
pathForResource
:
@"app"
ofType
:
@"skyx"
];
}
// TODO(eseidel): This does not belong in sky_window!
// Probably belongs in NSApplicationDelegate didFinishLaunching.
// We also want a separate setup for normal apps vs SkyShell
// normal apps only use a skyx vs. SkyShell which always pulls from network.
-
(
void
)
setupAndLoadDart
{
auto
interface_request
=
mojo
::
GetProxy
(
&
_sky_engine
);
self
.
platformView
->
ConnectToEngine
(
interface_request
.
Pass
());
base
::
CommandLine
&
command_line
=
*
base
::
CommandLine
::
ForCurrentProcess
();
base
::
CommandLine
::
StringVector
args
=
command_line
.
GetArgs
();
if
(
args
.
size
()
>
0
)
{
LOG
(
INFO
)
<<
"Loading "
<<
args
[
0
];
mojo
::
String
string
(
args
[
0
]);
_sky_engine
->
RunFromNetwork
(
string
);
return
;
}
NSString
*
endpoint
=
self
.
skyInitialBundleURL
;
if
(
endpoint
.
length
>
0
)
{
// Load from bundle
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录