Index: third_party/WebKit/Source/core/layout/LayoutFullScreen.h |
diff --git a/third_party/WebKit/Source/core/page/PointerLockController.h b/third_party/WebKit/Source/core/layout/LayoutFullScreen.h |
similarity index 52% |
copy from third_party/WebKit/Source/core/page/PointerLockController.h |
copy to third_party/WebKit/Source/core/layout/LayoutFullScreen.h |
index 306a434817b66a765755703a5e84c9dd00055ca8..3ba2a1dd8265f8b2c324649bd829f29c9d880318 100644 |
--- a/third_party/WebKit/Source/core/page/PointerLockController.h |
+++ b/third_party/WebKit/Source/core/layout/LayoutFullScreen.h |
@@ -1,5 +1,5 @@ |
/* |
- * Copyright (C) 2012 Google Inc. All rights reserved. |
+ * Copyright (C) 2010 Apple Inc. All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
@@ -22,52 +22,48 @@ |
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
-#ifndef PointerLockController_h |
-#define PointerLockController_h |
+#ifndef LayoutFullScreen_h |
+#define LayoutFullScreen_h |
#include "core/CoreExport.h" |
-#include "platform/heap/Handle.h" |
-#include "wtf/RefPtr.h" |
-#include "wtf/text/AtomicString.h" |
+#include "core/layout/LayoutFlexibleBox.h" |
+#include "core/style/StyleInheritedData.h" |
namespace blink { |
-class Element; |
-class Document; |
-class Page; |
-class PlatformMouseEvent; |
+class LayoutBlockFlow; |
-class CORE_EXPORT PointerLockController final : public GarbageCollected<PointerLockController> { |
- WTF_MAKE_NONCOPYABLE(PointerLockController); |
+class CORE_EXPORT LayoutFullScreen final : public LayoutFlexibleBox { |
public: |
- static PointerLockController* create(Page*); |
+ static LayoutFullScreen* createAnonymous(Document*); |
- void requestPointerLock(Element* target); |
- void requestPointerUnlock(); |
- void elementRemoved(Element*); |
- void documentDetached(Document*); |
- bool lockPending() const; |
- Element* element() const; |
+ bool isOfType(LayoutObjectType type) const override { return type == LayoutObjectLayoutFullScreen || LayoutFlexibleBox::isOfType(type); } |
+ const char* name() const override { return "LayoutFullScreen"; } |
- void didAcquirePointerLock(); |
- void didNotAcquirePointerLock(); |
- void didLosePointerLock(); |
- void dispatchLockedMouseEvent(const PlatformMouseEvent&, const AtomicString& eventType); |
+ void resetPlaceholder() { m_placeholder = nullptr; } |
+ LayoutBlockFlow* placeholder() { return m_placeholder; } |
+ void createPlaceholder(PassRefPtr<ComputedStyle>, const LayoutRect& frameRect); |
- DECLARE_TRACE(); |
+ |
+ static LayoutObject* wrapLayoutObject(LayoutObject*, LayoutObject*, Document*); |
+ void unwrapLayoutObject(); |
+ |
+ void updateStyle(); |
+ bool anonymousHasStylePropagationOverride() override { return true; } |
+ |
+ // Must call setStyleWithWritingModeOfParent() instead. |
+ void setStyle(PassRefPtr<ComputedStyle>) = delete; |
private: |
- explicit PointerLockController(Page*); |
- void clearElement(); |
- void enqueueEvent(const AtomicString& type, Element*); |
- void enqueueEvent(const AtomicString& type, Document*); |
- |
- Member<Page> m_page; |
- bool m_lockPending; |
- Member<Element> m_element; |
- Member<Document> m_documentOfRemovedElementWhileWaitingForUnlock; |
+ LayoutFullScreen(); |
+ void willBeDestroyed() override; |
+ |
+protected: |
+ LayoutBlockFlow* m_placeholder; |
}; |
+DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutFullScreen, isLayoutFullScreen()); |
+ |
} // namespace blink |
-#endif // PointerLockController_h |
+#endif |