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

Side by Side Diff: android_webview/browser/browser_view_renderer.h

Issue 17274013: [Android WebView] Clamp Bitmap size to max. dimensions when drawing into a Canvas (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: joth 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 unified diff | Download patch
« no previous file with comments | « no previous file | android_webview/browser/in_process_view_renderer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #ifndef ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_ 5 #ifndef ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_
6 #define ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_ 6 #define ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_
7 7
8 #include "base/android/scoped_java_ref.h" 8 #include "base/android/scoped_java_ref.h"
9 #include "ui/gfx/point.h" 9 #include "ui/gfx/point.h"
10 #include "ui/gfx/rect.h" 10 #include "ui/gfx/rect.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 virtual ~Client() {} 47 virtual ~Client() {}
48 }; 48 };
49 49
50 // Delegate to perform rendering actions involving Java objects. 50 // Delegate to perform rendering actions involving Java objects.
51 class JavaHelper { 51 class JavaHelper {
52 public: 52 public:
53 // Creates a RGBA_8888 Java Bitmap object of the requested size. 53 // Creates a RGBA_8888 Java Bitmap object of the requested size.
54 virtual base::android::ScopedJavaLocalRef<jobject> CreateBitmap( 54 virtual base::android::ScopedJavaLocalRef<jobject> CreateBitmap(
55 JNIEnv* env, 55 JNIEnv* env,
56 int width, 56 int width,
57 int height) = 0; 57 int height,
58 const base::android::JavaRef<jobject>& jcanvas) = 0;
58 59
59 // Draws the provided Java Bitmap into the provided Java Canvas. 60 // Draws the provided Java Bitmap into the provided Java Canvas.
60 virtual void DrawBitmapIntoCanvas( 61 virtual void DrawBitmapIntoCanvas(
61 JNIEnv* env, 62 JNIEnv* env,
62 const base::android::JavaRef<jobject>& jbitmap, 63 const base::android::JavaRef<jobject>& jbitmap,
63 const base::android::JavaRef<jobject>& jcanvas, 64 const base::android::JavaRef<jobject>& jcanvas,
64 int x, 65 int x,
65 int y) = 0; 66 int y) = 0;
66 67
67 // Creates a Java Picture object that records drawing the provided Bitmap. 68 // Creates a Java Picture object that records drawing the provided Bitmap.
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 virtual bool IsAttachedToWindow() = 0; 109 virtual bool IsAttachedToWindow() = 0;
109 virtual bool IsViewVisible() = 0; 110 virtual bool IsViewVisible() = 0;
110 virtual gfx::Rect GetScreenRect() = 0; 111 virtual gfx::Rect GetScreenRect() = 0;
111 112
112 virtual ~BrowserViewRenderer() {} 113 virtual ~BrowserViewRenderer() {}
113 }; 114 };
114 115
115 } // namespace android_webview 116 } // namespace android_webview
116 117
117 #endif // ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_ 118 #endif // ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_
OLDNEW
« no previous file with comments | « no previous file | android_webview/browser/in_process_view_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698