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

Unified Diff: Source/modules/screen_orientation/ScreenScreenOrientation.cpp

Issue 381753002: Revert of [screen-orientation] Update implementation to match recent spec changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 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: Source/modules/screen_orientation/ScreenScreenOrientation.cpp
diff --git a/Source/modules/screen_orientation/ScreenScreenOrientation.cpp b/Source/modules/screen_orientation/ScreenScreenOrientation.cpp
deleted file mode 100644
index db7537e20e9b3b2e800859bb5a078a4517b3460b..0000000000000000000000000000000000000000
--- a/Source/modules/screen_orientation/ScreenScreenOrientation.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "config.h"
-#include "modules/screen_orientation/ScreenScreenOrientation.h"
-
-#include "bindings/core/v8/ScriptState.h"
-#include "core/frame/Screen.h"
-#include "modules/screen_orientation/ScreenOrientation.h"
-
-namespace WebCore {
-
-// static
-ScreenScreenOrientation& ScreenScreenOrientation::from(Screen& screen)
-{
- ScreenScreenOrientation* supplement = static_cast<ScreenScreenOrientation*>(WillBeHeapSupplement<Screen>::from(screen, supplementName()));
- if (!supplement) {
- supplement = new ScreenScreenOrientation();
- provideTo(screen, supplementName(), adoptPtrWillBeNoop(supplement));
- }
- return *supplement;
-}
-
-ScreenScreenOrientation::~ScreenScreenOrientation()
-{
-}
-
-// static
-ScreenOrientation* ScreenScreenOrientation::orientation(ScriptState* state, Screen& screen)
-{
- ScreenScreenOrientation& self = ScreenScreenOrientation::from(screen);
- if (!screen.frame())
- return 0;
-
- if (!self.m_orientation)
- self.m_orientation = ScreenOrientation::create(screen.frame());
-
- return self.m_orientation.get();
-}
-
-const char* ScreenScreenOrientation::supplementName()
-{
- return "ScreenScreenOrientation";
-}
-
-void ScreenScreenOrientation::trace(Visitor* visitor)
-{
- m_orientation->trace(visitor);
- WillBeHeapSupplement<Screen>::trace(visitor);
-}
-
-} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698