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

Side by Side 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: Patch for landing. 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/WebKit/chromium/WebKit.gyp ('k') | Source/WebKit/chromium/src/PinchViewports.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 10 matching lines...) Expand all
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef ContentDecryptionModuleSession_h 31 #ifndef PinchViewports_h
32 #define ContentDecryptionModuleSession_h 32 #define PinchViewports_h
33 33
34 #include "public/platform/WebContentDecryptionModuleSession.h" 34 #include "core/platform/graphics/GraphicsLayerClient.h"
35 #include "core/platform/graphics/IntSize.h"
36 #include "public/platform/WebScrollbar.h"
37 #include "public/platform/WebSize.h"
35 #include "wtf/OwnPtr.h" 38 #include "wtf/OwnPtr.h"
36 #include "wtf/PassOwnPtr.h" 39 #include "wtf/PassOwnPtr.h"
37 #include "wtf/text/WTFString.h" 40
41 namespace WebCore {
42 class GraphicsContext;
43 class GraphicsLayer;
44 class IntRect;
45 class IntSize;
46 }
38 47
39 namespace WebKit { 48 namespace WebKit {
40 class WebContentDecryptionModule;
41 }
42 49
43 namespace WTF { 50 class WebLayerTreeView;
44 class Uint8Array; 51 class WebScrollbarLayer;
45 } 52 class WebViewImpl;
46 53
47 namespace WebCore { 54 class PinchViewports : WebCore::GraphicsLayerClient {
55 public:
56 static PassOwnPtr<PinchViewports> create(WebViewImpl* owner);
57 ~PinchViewports();
48 58
49 class KURL; 59 void setOverflowControlsHostLayer(WebCore::GraphicsLayer*);
60 WebCore::GraphicsLayer* rootGraphicsLayer()
61 {
62 return m_innerViewportClipLayer.get();
63 }
64 void setViewportSize(const WebCore::IntSize&);
50 65
51 class ContentDecryptionModuleSessionClient { 66 void registerViewportLayersWithTreeView(WebLayerTreeView*) const;
52 public: 67 void clearViewportLayersForTreeView(WebLayerTreeView*) const;
53 enum MediaKeyErrorCode { UnknownError = 1, ClientError }; 68
54 virtual void keyAdded() = 0; 69 // GraphicsLayerClient implementation.
55 virtual void keyError(MediaKeyErrorCode, unsigned long systemCode) = 0; 70 virtual void notifyAnimationStarted(const WebCore::GraphicsLayer*, double ti me) OVERRIDE;
56 virtual void keyMessage(const unsigned char* message, size_t messageLength, const KURL& destinationURL) = 0; 71 virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsC ontext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& inClip) OV ERRIDE;
72
73 private:
74 explicit PinchViewports(WebViewImpl* owner);
75
76 void setupScrollbar(WebKit::WebScrollbar::Orientation);
77
78 WebViewImpl* m_owner;
79 OwnPtr<WebCore::GraphicsLayer> m_innerViewportClipLayer;
80 OwnPtr<WebCore::GraphicsLayer> m_pageScaleLayer;
81 OwnPtr<WebCore::GraphicsLayer> m_innerViewportScrollLayer;
82 OwnPtr<WebCore::GraphicsLayer> m_overlayScrollbarHorizontal;
83 OwnPtr<WebCore::GraphicsLayer> m_overlayScrollbarVertical;
57 }; 84 };
58 85
59 class ContentDecryptionModuleSession : private WebKit::WebContentDecryptionModul eSession::Client { 86 } // namespace WebKit
60 public:
61 static PassOwnPtr<ContentDecryptionModuleSession> create(ContentDecryptionMo duleSessionClient*);
62 87
63 ContentDecryptionModuleSession(WebKit::WebContentDecryptionModule*, ContentD ecryptionModuleSessionClient*); 88 #endif // PinchViewports_h
64 ~ContentDecryptionModuleSession();
65
66 String sessionId() const;
67 void generateKeyRequest(const String& mimeType, const WTF::Uint8Array& initD ata);
68 void update(const WTF::Uint8Array& key);
69 void close();
70
71 private:
72 // WebKit::WebContentDecryptionModuleSession::Client
73 virtual void keyAdded() OVERRIDE;
74 virtual void keyError(MediaKeyErrorCode, unsigned long systemCode) OVERRIDE;
75 virtual void keyMessage(const unsigned char* message, size_t messageLength, const WebKit::WebURL& destinationURL) OVERRIDE;
76
77 OwnPtr<WebKit::WebContentDecryptionModuleSession> m_session;
78
79 ContentDecryptionModuleSessionClient* m_client;
80 };
81
82 } // namespace WebCore
83
84 #endif // ContentDecryptionModuleSession_h
OLDNEW
« no previous file with comments | « Source/WebKit/chromium/WebKit.gyp ('k') | Source/WebKit/chromium/src/PinchViewports.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698