从rc_11(11.80927)
的源代码中,它确实有一个接口Application::SetStartLink
来设置起始URL,但是根本没有使用param,切换时无法更改url从预加载状态到kStateStarted用于某些特殊情况(例如,为拨号添加url配对参数):
//there doesn't use the link param(url) in StartApplication in cobalt/browser/main.cc
void StartApplication(int /*argc*/, char** /*argv*/, const char* /*link*/,
const base::Closure& quit_closure) {
if (!g_application) {
g_application = new cobalt::browser::Application(quit_closure,
false /*should_preload*/);
DCHECK(g_application);
} else {
g_application->Start(); -->does NOT use the url param
}
}
答案 0 :(得分:0)
网址和初始深层链接只能在预加载时设置。这是因为预加载基本上与正常加载一样,因此更改URL将使已完成的加载无效,并且需要加载新URL。更改初始深层链接也会使初始深层链接不会改变的假设失效。
加载后,您可以随时调度kSbEventTypeLink。这不会更改URL,但会向正在运行的HTML应用程序发送消息,而不会导致重新加载。
答案 1 :(得分:0)
Yes, the additionalDataUrl can be fixed before preload time.
But we need add pairingCode when DIAL cast from DIAL client.
1> User cast a video from YouTube mobile client.
1> YouTube client will send a POST method to Launch Cobalt through DIALserver with pairingCode. ex. pairingCode=08f5b46d-f027-4ce5-82dc-aae8d7ff97ea&theme=cl
2> We should add the pairingCode as param in URL.
3> TV YouTube based on Cobalt will auto playback the cast video.
It also used to WOL/WOW cases.
So, we can add pairingCode without preload function but for preload mode. How can we handle this case? Is there new way to do it for Cobalt preload function?