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

Unified Diff: Source/WebKit/chromium/src/PinchViewports.h

Issue 16799005: Insert pinch zoom virtual viewport layers to graphics layer tree. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address comments. 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/WebKit/chromium/src/PinchViewports.h
diff --git a/Source/core/platform/graphics/ContentDecryptionModuleSession.h b/Source/WebKit/chromium/src/PinchViewports.h
similarity index 50%
copy from Source/core/platform/graphics/ContentDecryptionModuleSession.h
copy to Source/WebKit/chromium/src/PinchViewports.h
index 30ead6fe8baefd3374c583e4f84459ec89709721..f1dbf6ecdc10d54aee93df43a493e82caa9d9ac4 100644
--- a/Source/core/platform/graphics/ContentDecryptionModuleSession.h
+++ b/Source/WebKit/chromium/src/PinchViewports.h
@@ -28,57 +28,61 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef ContentDecryptionModuleSession_h
-#define ContentDecryptionModuleSession_h
+#ifndef PinchViewports_h
+#define PinchViewports_h
-#include "public/platform/WebContentDecryptionModuleSession.h"
+#include "core/platform/graphics/GraphicsLayerClient.h"
+#include "core/platform/graphics/IntSize.h"
+#include "public/platform/WebScrollbar.h"
+#include "public/platform/WebSize.h"
#include "wtf/OwnPtr.h"
#include "wtf/PassOwnPtr.h"
-#include "wtf/text/WTFString.h"
-namespace WebKit {
-class WebContentDecryptionModule;
-}
-
-namespace WTF {
-class Uint8Array;
+namespace WebCore {
+class GraphicsContext;
+class GraphicsLayer;
+class IntRect;
+class IntSize;
}
-namespace WebCore {
+namespace WebKit {
-class KURL;
+class WebLayerTreeView;
+class WebScrollbarLayer;
+class WebViewImpl;
-class ContentDecryptionModuleSessionClient {
+class PinchViewports : WebCore::GraphicsLayerClient {
public:
- enum MediaKeyErrorCode { UnknownError = 1, ClientError };
- virtual void keyAdded() = 0;
- virtual void keyError(MediaKeyErrorCode, unsigned long systemCode) = 0;
- virtual void keyMessage(const unsigned char* message, size_t messageLength, const KURL& destinationURL) = 0;
-};
+ static PassOwnPtr<PinchViewports> create(WebViewImpl* owner);
+ ~PinchViewports();
-class ContentDecryptionModuleSession : private WebKit::WebContentDecryptionModuleSession::Client {
-public:
- static PassOwnPtr<ContentDecryptionModuleSession> create(ContentDecryptionModuleSessionClient*);
+ void setOverflowControlsHostLayer(WebCore::GraphicsLayer*);
+ WebCore::GraphicsLayer* rootGraphicsLayer()
+ {
+ return m_innerViewportClipLayer.get();
+ }
+ void setViewportSize(const WebCore::IntSize&);
- ContentDecryptionModuleSession(WebKit::WebContentDecryptionModule*, ContentDecryptionModuleSessionClient*);
- ~ContentDecryptionModuleSession();
+ void registerViewportLayersWithTreeView(WebLayerTreeView*) const;
+ void clearViewportLayersForTreeView(WebLayerTreeView*) const;
- String sessionId() const;
- void generateKeyRequest(const String& mimeType, const WTF::Uint8Array& initData);
- void update(const WTF::Uint8Array& key);
- void close();
+ // GraphicsLayerClient implementation.
+ virtual void notifyAnimationStarted(const WebCore::GraphicsLayer*, double time) OVERRIDE;
+ virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& inClip) OVERRIDE;
private:
- // WebKit::WebContentDecryptionModuleSession::Client
- virtual void keyAdded() OVERRIDE;
- virtual void keyError(MediaKeyErrorCode, unsigned long systemCode) OVERRIDE;
- virtual void keyMessage(const unsigned char* message, size_t messageLength, const WebKit::WebURL& destinationURL) OVERRIDE;
+ explicit PinchViewports(WebViewImpl* owner);
- OwnPtr<WebKit::WebContentDecryptionModuleSession> m_session;
+ void setupScrollbar(WebKit::WebScrollbar::Orientation);
- ContentDecryptionModuleSessionClient* m_client;
+ WebViewImpl* m_owner;
+ OwnPtr<WebCore::GraphicsLayer> m_innerViewportClipLayer;
+ OwnPtr<WebCore::GraphicsLayer> m_pageScaleLayer;
+ OwnPtr<WebCore::GraphicsLayer> m_innerViewportScrollLayer;
+ OwnPtr<WebCore::GraphicsLayer> m_overlayScrollbarHorizontal;
+ OwnPtr<WebCore::GraphicsLayer> m_overlayScrollbarVertical;
};
-} // namespace WebCore
+} // namespace WebKit
-#endif // ContentDecryptionModuleSession_h
+#endif // PinchViewports_h

Powered by Google App Engine
This is Rietveld 408576698