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

Unified Diff: Source/core/platform/graphics/CDMSession.h

Issue 16387015: Make unprefixed EME APIs use platform and Chromium. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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
Index: Source/core/platform/graphics/CDMSession.h
diff --git a/Source/core/html/ime/InputMethodContext.h b/Source/core/platform/graphics/CDMSession.h
similarity index 65%
copy from Source/core/html/ime/InputMethodContext.h
copy to Source/core/platform/graphics/CDMSession.h
index 4315ea86e45649c521952c3a7a4c71db57c44f07..fa9b082a55d94c57887a6a925127fee17bb7a601 100644
--- a/Source/core/html/ime/InputMethodContext.h
+++ b/Source/core/platform/graphics/CDMSession.h
@@ -28,44 +28,44 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef InputMethodContext_h
-#define InputMethodContext_h
+#ifndef CDMSession_h
+#define CDMSession_h
-#include "bindings/v8/ScriptWrappable.h"
-#include "core/html/HTMLElement.h"
+#include "core/html/MediaKeyError.h"
+#include "wtf/OwnPtr.h"
#include "wtf/PassOwnPtr.h"
#include "wtf/RefPtr.h"
-#include "wtf/text/WTFString.h"
+
+namespace WTF {
+class String;
+class Uint8Array;
+}
namespace WebCore {
-class Composition;
-class Node;
+class KURL;
+
+class CDMSessionClient {
ddorwin 2013/06/06 23:29:50 Should we prefer [un]nested client classes?
+public:
+ virtual void keyAdded() = 0;
+ virtual void keyError(MediaKeyError::Code, unsigned long systemCode) = 0;
+ virtual void keyMessage(const unsigned char* message, unsigned messageLength, const KURL& destinationURL) = 0;
+};
-class InputMethodContext : public ScriptWrappable {
+class CDMSession {
public:
- static PassOwnPtr<InputMethodContext> create(HTMLElement*);
- ~InputMethodContext();
+ static PassOwnPtr<CDMSession> create(CDMSessionClient*);
- void ref() { m_element->ref(); }
- void deref() { m_element->deref(); }
+ virtual ~CDMSession() { }
- Composition* composition() const;
- bool enabled() const;
- void setEnabled(bool);
- String locale() const;
- void confirmComposition();
- void setCaretRectangle(Node* anchor, int x, int y, int w, int h);
- void setExclusionRectangle(Node* anchor, int x, int y, int w, int h);
- bool open();
+ virtual WTF::String sessionId() const = 0;
-private:
- InputMethodContext(HTMLElement*);
- bool m_enabled;
- RefPtr<Composition> m_composition;
- HTMLElement* m_element;
+ // All results are reported, if applicable, asynchronously via CDMSessionClient.
+ virtual void generateKeyRequest(const WTF::String& mimeType, const WTF::Uint8Array& initData) = 0;
+ virtual void update(const WTF::Uint8Array& key) = 0;
+ virtual void close() = 0;
};
} // namespace WebCore
-#endif // InputMethodContext_h
+#endif // CDMSession_h

Powered by Google App Engine
This is Rietveld 408576698