Chromium Code Reviews| Index: public/platform/WebLockOrientationCallback.h |
| diff --git a/public/platform/WebLockOrientationCallback.h b/public/platform/WebLockOrientationCallback.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..39b145aadbcaf29dcb6c6793a4a8dbff90c91b33 |
| --- /dev/null |
| +++ b/public/platform/WebLockOrientationCallback.h |
| @@ -0,0 +1,33 @@ |
| +// 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 WebLockOrientationCallback_h |
| +#define WebLockOrientationCallback_h |
| + |
| +#include "public/platform/WebScreenOrientationType.h" |
| + |
| +namespace blink { |
| + |
| +// WebScreenOrientationType is an interface to be used by the embedder in order |
| +// to inform Blink when a screen lock operation has succeeded or failed. |
| +// A success notification comes with the new orientation angle and orientation |
| +// type and a failure notification comes with an information about the type of |
| +// failure. |
| +class WebLockOrientationCallback { |
| +public: |
| + enum ErrorType { |
| + NotAvailable, // If locking isn't available on the platform. |
|
jochen (gone - plz use gerrit)
2014/05/22 08:34:35
enums should start all with the enum's name, i.e.
mlamouri (slow - plz ping)
2014/05/22 08:58:56
Done.
|
| + FullScreenRequired, // If fullscreen is required to lock. |
| + Canceled, // If another lock/unlock got called before that one ended. |
| + }; |
| + |
| + virtual ~WebLockOrientationCallback() { } |
| + |
| + virtual void onSuccess(unsigned angle, WebScreenOrientationType) = 0; |
| + virtual void onError(ErrorType) = 0; |
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif // WebLockOrientationCallback_h |