diff options
Diffstat (limited to 'third_party/WebKit/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp')
-rw-r--r-- | third_party/WebKit/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/third_party/WebKit/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp b/third_party/WebKit/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp index 6a70b33..79b6ad3 100644 --- a/third_party/WebKit/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp +++ b/third_party/WebKit/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp @@ -27,11 +27,12 @@ #include "WKBundlePagePrivate.h" #include "InjectedBundleBackForwardList.h" +#include "WKAPICast.h" +#include "WKBundleAPICast.h" +#include "WebImage.h" #include "WebPage.h" #include "WebURL.h" #include "WebURLRequest.h" -#include "WKAPICast.h" -#include "WKBundleAPICast.h" #include <WebCore/KURL.h> @@ -166,3 +167,15 @@ bool WKBundlePageFindString(WKBundlePageRef pageRef, WKStringRef target, WKFindO { return toImpl(pageRef)->findStringFromInjectedBundle(toImpl(target)->string(), toFindOptions(findOptions)); } + +WKImageRef WKBundlePageCreateSnapshotInViewCoordinates(WKBundlePageRef pageRef, WKRect rect, WKImageOptions options) +{ + RefPtr<WebImage> webImage = toImpl(pageRef)->snapshotInViewCoordinates(toIntRect(rect), toImageOptions(options)); + return toAPI(webImage.release().leakRef()); +} + +WKImageRef WKBundlePageCreateSnapshotInDocumentCoordinates(WKBundlePageRef pageRef, WKRect rect, WKImageOptions options) +{ + RefPtr<WebImage> webImage = toImpl(pageRef)->snapshotInDocumentCoordinates(toIntRect(rect), toImageOptions(options)); + return toAPI(webImage.release().leakRef()); +} |