Chromium Code Reviews| Index: content/public/browser/screen_orientation_delegate.h |
| diff --git a/content/public/browser/screen_orientation_delegate.h b/content/public/browser/screen_orientation_delegate.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..243d2c3659b141e55560786039772cc36edbf67a |
| --- /dev/null |
| +++ b/content/public/browser/screen_orientation_delegate.h |
| @@ -0,0 +1,43 @@ |
| +// 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. |
| + |
| +#ifndef CONTENT_PUBLIC_BROWSER_SCREEN_ORIENTATION_DELEGATE_H_ |
| +#define CONTENT_PUBLIC_BROWSER_SCREEN_ORIENTATION_DELEGATE_H_ |
| + |
| +#include "base/macros.h" |
| +#include "content/common/content_export.h" |
| +#include "third_party/WebKit/public/platform/WebScreenOrientationLockType.h" |
| + |
| +namespace content { |
| + |
| +class WebContents; |
| + |
| +// Can be implemented to provide platform specific functionality for |
| +// ScreenOrientationProvider. |
| +class CONTENT_EXPORT ScreenOrientationDelegate { |
| + public: |
| + ScreenOrientationDelegate() {}; |
| + virtual ~ScreenOrientationDelegate() {} |
| + |
| + // Returns true if the tab must be fullscreen in order for |
|
mlamouri (slow - plz ping)
2014/10/08 09:13:18
nit: s/tab/|web_contents|/ ?
|
| + // ScreenOrientationProvider to respond to requests. |
| + virtual bool FullScreenRequired(WebContents* web_contents) = 0; |
| + |
| + // Lock display to the given orientation. |
| + virtual void Lock(blink::WebScreenOrientationLockType lock_orientation) = 0; |
| + |
| + // Are ScreenOrientationProvider requests currently supported by the platform. |
| + virtual bool ScreenOrientationProviderSupported() = 0; |
| + |
| + // Unlocks the display, allowing hardware rotation to resume. |
| + virtual void Unlock() = 0; |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(ScreenOrientationDelegate); |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_PUBLIC_BROWSER_SCREEN_ORIENTATION_DELEGATE_H_ |
| + |