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

Unified Diff: Source/platform/graphics/ColorSpaceProfile.h

Issue 352873002: [wip] image color correction (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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/platform/graphics/ColorSpaceProfile.h
diff --git a/Source/modules/crypto/AesKeyAlgorithm.h b/Source/platform/graphics/ColorSpaceProfile.h
similarity index 63%
copy from Source/modules/crypto/AesKeyAlgorithm.h
copy to Source/platform/graphics/ColorSpaceProfile.h
index be51a8d22e3d9a969aebf1b23ce5effcdec2d750..d14ab6fa478558387b85f1120b4ba340dd0b285f 100644
--- a/Source/modules/crypto/AesKeyAlgorithm.h
+++ b/Source/platform/graphics/ColorSpaceProfile.h
@@ -28,31 +28,64 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef AesKeyAlgorithm_h
-#define AesKeyAlgorithm_h
+#ifndef ColorSpaceProfile_h
+#define ColorSpaceProfile_h
-#include "bindings/v8/ScriptWrappable.h"
-#include "modules/crypto/KeyAlgorithm.h"
-#include "platform/heap/Handle.h"
-#include "wtf/Forward.h"
+#include "wtf/PassRefPtr.h"
#include "wtf/RefCounted.h"
+#if USE(QCMSLIB)
+#include "qcms.h"
+#include "wtf/ThreadSafeRefCounted.h"
+#endif
+
namespace WebCore {
-class AesKeyAlgorithm : public KeyAlgorithm {
+#if USE(QCMSLIB)
+
+class ColorSpaceProfile : public ThreadSafeRefCounted<ColorSpaceProfile> {
public:
- static AesKeyAlgorithm* create(const blink::WebCryptoKeyAlgorithm&);
+ static PassRefPtr<ColorSpaceProfile> create(qcms_profile* profile)
+ {
+ return adoptRef(new ColorSpaceProfile(profile));
+ }
+
+ qcms_profile* profile() { return m_profile; }
- unsigned short length();
+ ~ColorSpaceProfile()
+ {
+ if (m_profile)
+ qcms_profile_release(m_profile);
- virtual void trace(Visitor*) OVERRIDE;
+ m_profile = 0;
+ }
private:
- explicit AesKeyAlgorithm(const blink::WebCryptoKeyAlgorithm&);
+ ColorSpaceProfile(qcms_profile* profile)
+ : m_profile(profile)
+ {
+ }
+
+ qcms_profile* m_profile;
};
-DEFINE_KEY_ALGORITHM_TYPE_CASTS(AesKeyAlgorithm);
+#else
-} // namespace WebCore
+class ColorSpaceProfile : public RefCounted<ColorSpaceProfile> {
+public:
+ static PassRefPtr<ColorSpaceProfile> create(void*)
+ {
+ return nullptr;
+ }
+
+private:
+ ColorSpaceProfile()
+ {
+ }
+};
#endif
+
+} // namespace WebCore
+
+#endif // ColorSpaceProfile_h

Powered by Google App Engine
This is Rietveld 408576698