зеркало из https://github.com/mozilla/gecko-dev.git
Bug 668760 - Factor out method to get weave engine (r=mbrubeck)
This commit is contained in:
Родитель
557bef417e
Коммит
8d7a147c2f
|
@ -1427,16 +1427,22 @@
|
||||||
|
|
||||||
<field name="scrollBoxObject">this._children.scrollBoxObject</field>
|
<field name="scrollBoxObject">this._children.scrollBoxObject</field>
|
||||||
|
|
||||||
|
<method name="_getWeaveEngine">
|
||||||
|
<body><![CDATA[
|
||||||
|
// Return null if the Weave isn't ready
|
||||||
|
if (document.getElementById("cmd_remoteTabs").getAttribute("disabled") == "true")
|
||||||
|
return null;
|
||||||
|
if (Weave.Status.checkSetup() == Weave.CLIENT_NOT_CONFIGURED)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
return Weave.Engines.get("tabs");
|
||||||
|
]]></body>
|
||||||
|
</method>
|
||||||
|
|
||||||
<method name="_getRemoteTabs">
|
<method name="_getRemoteTabs">
|
||||||
<body><![CDATA[
|
<body><![CDATA[
|
||||||
// Don't do anything if the Weave isn't ready
|
|
||||||
if (document.getElementById("cmd_remoteTabs").getAttribute("disabled") == "true")
|
|
||||||
return [];
|
|
||||||
if (Weave.Status.checkSetup() == Weave.CLIENT_NOT_CONFIGURED)
|
|
||||||
return [];
|
|
||||||
|
|
||||||
// Don't do anything if the tabs engine isn't ready
|
// Don't do anything if the tabs engine isn't ready
|
||||||
let engine = Weave.Engines.get("tabs");
|
let engine = this._getWeaveEngine();
|
||||||
if (!engine)
|
if (!engine)
|
||||||
return [];
|
return [];
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче