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

Side by Side Diff: android_webview/browser/aw_picture.cc

Issue 2863233002: [WebView] Move files from native to browser (Closed)
Patch Set: Created 3 years, 7 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "android_webview/native/aw_picture.h" 5 #include "android_webview/browser/aw_picture.h"
6 6
7 #include "android_webview/native/java_browser_view_renderer_helper.h" 7 #include "android_webview/browser/java_browser_view_renderer_helper.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "jni/AwPicture_jni.h" 9 #include "jni/AwPicture_jni.h"
10 #include "third_party/skia/include/core/SkPicture.h" 10 #include "third_party/skia/include/core/SkPicture.h"
11 11
12 using base::android::JavaParamRef; 12 using base::android::JavaParamRef;
13 13
14 namespace android_webview { 14 namespace android_webview {
15 15
16 AwPicture::AwPicture(sk_sp<SkPicture> picture) 16 AwPicture::AwPicture(sk_sp<SkPicture> picture) : picture_(std::move(picture)) {
17 : picture_(std::move(picture)) {
18 DCHECK(picture_); 17 DCHECK(picture_);
19 } 18 }
20 19
21 AwPicture::~AwPicture() {} 20 AwPicture::~AwPicture() {}
22 21
23 void AwPicture::Destroy(JNIEnv* env, const JavaParamRef<jobject>& obj) { 22 void AwPicture::Destroy(JNIEnv* env, const JavaParamRef<jobject>& obj) {
24 delete this; 23 delete this;
25 } 24 }
26 25
27 jint AwPicture::GetWidth(JNIEnv* env, const JavaParamRef<jobject>& obj) { 26 jint AwPicture::GetWidth(JNIEnv* env, const JavaParamRef<jobject>& obj) {
(...skipping 17 matching lines...) Expand all
45 return; 44 return;
46 } 45 }
47 picture_->playback(canvas_holder->GetCanvas()); 46 picture_->playback(canvas_holder->GetCanvas());
48 } 47 }
49 48
50 bool RegisterAwPicture(JNIEnv* env) { 49 bool RegisterAwPicture(JNIEnv* env) {
51 return RegisterNativesImpl(env); 50 return RegisterNativesImpl(env);
52 } 51 }
53 52
54 } // namespace android_webview 53 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698