Index: third_party/WebKit/Source/modules/vr/VRDisplay.h |
diff --git a/third_party/WebKit/Source/modules/vr/VRDisplay.h b/third_party/WebKit/Source/modules/vr/VRDisplay.h |
index 308ed3ff81c698d2a7ecad77b360dcd8777719d1..f2f8e2f36e25a9f133c0b564548dd3ca56c9d025 100644 |
--- a/third_party/WebKit/Source/modules/vr/VRDisplay.h |
+++ b/third_party/WebKit/Source/modules/vr/VRDisplay.h |
@@ -18,6 +18,8 @@ |
#include "platform/wtf/text/WTFString.h" |
#include "public/platform/WebGraphicsContext3DProvider.h" |
+#include "core/dom/SuspendableObject.h" |
+ |
namespace gpu { |
namespace gles2 { |
class GLES2Interface; |
@@ -39,7 +41,7 @@ enum VREye { kVREyeNone, kVREyeLeft, kVREyeRight }; |
class VRDisplay final : public EventTargetWithInlineData, |
public ActiveScriptWrappable<VRDisplay>, |
- public ContextLifecycleObserver, |
+ public SuspendableObject, |
public device::mojom::blink::VRDisplayClient, |
public device::mojom::blink::VRSubmitFrameClient { |
DEFINE_WRAPPERTYPEINFO(); |
@@ -89,6 +91,10 @@ class VRDisplay final : public EventTargetWithInlineData, |
// ScriptWrappable implementation. |
bool HasPendingActivity() const final; |
+ // SuspendableObject: |
+ void Suspend() override; |
+ void Resume() override; |
+ |
void FocusChanged(); |
DECLARE_VIRTUAL_TRACE(); |
@@ -209,6 +215,9 @@ class VRDisplay final : public EventTargetWithInlineData, |
device::mojom::blink::VRVSyncProviderPtr vr_v_sync_provider_; |
HeapDeque<Member<ScriptPromiseResolver>> pending_present_resolvers_; |
+ |
+ bool suspended_ = false; |
haraken
2017/06/08 00:55:12
You can drop this flag and instead use executionCo
billorr
2017/06/08 04:20:21
Done.
|
+ bool request_vsync_on_resume_ = false; |
}; |
using VRDisplayVector = HeapVector<Member<VRDisplay>>; |