Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(530)

Unified Diff: third_party/WebKit/Source/modules/vr/DocumentVR.cpp

Issue 2331223002: Added allowvr attribute to iframes and vrEnabled to Document (Closed)
Patch Set: Rebase and moved vrEnabled from navigator to document Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/vr/DocumentVR.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSStyleDeclaration.cpp b/third_party/WebKit/Source/modules/vr/DocumentVR.cpp
similarity index 54%
copy from third_party/WebKit/Source/core/css/CSSStyleDeclaration.cpp
copy to third_party/WebKit/Source/modules/vr/DocumentVR.cpp
index 308d0d2abc953a8f51788bdd787ed00dcb10bb73..ad4ff90fdc29bc27e73a95442504404de05fa817 100644
--- a/third_party/WebKit/Source/core/css/CSSStyleDeclaration.cpp
+++ b/third_party/WebKit/Source/modules/vr/DocumentVR.cpp
@@ -2,15 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "core/css/CSSStyleDeclaration.h"
+#include "modules/vr/DocumentVR.h"
-#include "core/css/CSSRule.h"
+#include "modules/vr/NavigatorVR.h"
namespace blink {
-DEFINE_TRACE_WRAPPERS(CSSStyleDeclaration)
+bool DocumentVR::vrEnabled(Document& document)
{
- visitor->traceWrappers(parentRule());
+ return NavigatorVR::allowedToUseVR(document.frame());
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698