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

Unified Diff: Source/modules/screen_orientation/ScreenOrientationController.h

Issue 1195793008: [DevTools] Implement screen orientation override. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Restore test Created 5 years, 6 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
« no previous file with comments | « Source/modules/modules.gypi ('k') | Source/modules/screen_orientation/ScreenOrientationController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/screen_orientation/ScreenOrientationController.h
diff --git a/Source/modules/screen_orientation/ScreenOrientationController.h b/Source/modules/screen_orientation/ScreenOrientationController.h
index f77d1bc21695efb6b65f5f68bd546cfe8753a084..6b886427ef9e2e840a46cffc8319980d4c76dfcc 100644
--- a/Source/modules/screen_orientation/ScreenOrientationController.h
+++ b/Source/modules/screen_orientation/ScreenOrientationController.h
@@ -36,6 +36,9 @@ public:
void lock(WebScreenOrientationLockType, WebLockOrientationCallback*);
void unlock();
+ void setOverride(WebScreenOrientationType, unsigned short angle);
+ void clearOverride();
+
static void provideTo(LocalFrame&, WebScreenOrientationClient*);
static ScreenOrientationController* from(LocalFrame&);
static const char* supplementName();
@@ -45,7 +48,7 @@ public:
private:
ScreenOrientationController(LocalFrame&, WebScreenOrientationClient*);
- static WebScreenOrientationType computeOrientation(ChromeClient&);
+ static WebScreenOrientationType computeOrientation(const IntRect&, uint16_t);
// Inherited from PlatformEventController.
virtual void didUpdateData() override;
@@ -57,6 +60,9 @@ private:
// Inherited from LocalFrameLifecycleObserver.
virtual void willDetachFrameHost() override;
+ unsigned short effectiveAngle(ChromeClient&);
+ WebScreenOrientationType effectiveType(ChromeClient&);
+
void notifyDispatcher();
void updateOrientation();
@@ -68,6 +74,9 @@ private:
PersistentWillBeMember<ScreenOrientation> m_orientation;
WebScreenOrientationClient* m_client;
Timer<ScreenOrientationController> m_dispatchEventTimer;
+ bool m_override;
+ WebScreenOrientationType m_overrideType;
+ unsigned short m_overrideAngle;
};
} // namespace blink
« no previous file with comments | « Source/modules/modules.gypi ('k') | Source/modules/screen_orientation/ScreenOrientationController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698