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

Side by Side Diff: android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java

Issue 1870163002: aw: Expose setDrawGLFunctionDetachedCallback to AwContents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/java/src/org/chromium/android_webview/AwContents.java » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 package com.android.webview.chromium; 5 package com.android.webview.chromium;
6 6
7 import android.annotation.SuppressLint; 7 import android.annotation.SuppressLint;
8 import android.annotation.TargetApi; 8 import android.annotation.TargetApi;
9 import android.app.assist.AssistStructure.ViewNode; 9 import android.app.assist.AssistStructure.ViewNode;
10 import android.content.Context; 10 import android.content.Context;
(...skipping 1871 matching lines...) Expand 10 before | Expand all | Expand 10 after
1882 if (checkNeedsPost()) { 1882 if (checkNeedsPost()) {
1883 mRunQueue.addTask(new Runnable() { 1883 mRunQueue.addTask(new Runnable() {
1884 @Override 1884 @Override
1885 public void run() { 1885 public void run() {
1886 onDetachedFromWindow(); 1886 onDetachedFromWindow();
1887 } 1887 }
1888 }); 1888 });
1889 return; 1889 return;
1890 } 1890 }
1891 1891
1892 if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.M && !"N".equals(Build. VERSION.CODENAME)) {
1893 mAwContents.onDrawGLFunctorDetached();
1894 }
1895 mAwContents.onDetachedFromWindow(); 1892 mAwContents.onDetachedFromWindow();
1896 } 1893 }
1897 1894
1898 @Override 1895 @Override
1899 public void onVisibilityChanged(final View changedView, final int visibility ) { 1896 public void onVisibilityChanged(final View changedView, final int visibility ) {
1900 // The AwContents will find out the container view visibility before the first draw so we 1897 // The AwContents will find out the container view visibility before the first draw so we
1901 // can safely ignore onVisibilityChanged callbacks that happen before in it(). 1898 // can safely ignore onVisibilityChanged callbacks that happen before in it().
1902 if (mAwContents == null) return; 1899 if (mAwContents == null) return;
1903 1900
1904 if (checkNeedsPost()) { 1901 if (checkNeedsPost()) {
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
2241 2238
2242 @Override 2239 @Override
2243 public PrintDocumentAdapter createPrintDocumentAdapter(String documentName) { 2240 public PrintDocumentAdapter createPrintDocumentAdapter(String documentName) {
2244 checkThread(); 2241 checkThread();
2245 return new AwPrintDocumentAdapter(mAwContents.getPdfExporter(), document Name); 2242 return new AwPrintDocumentAdapter(mAwContents.getPdfExporter(), document Name);
2246 } 2243 }
2247 2244
2248 // AwContents.NativeGLDelegate implementation ------------------------------ -------- 2245 // AwContents.NativeGLDelegate implementation ------------------------------ --------
2249 private class WebViewNativeGLDelegate implements AwContents.NativeGLDelegate { 2246 private class WebViewNativeGLDelegate implements AwContents.NativeGLDelegate {
2250 @Override 2247 @Override
2248 public boolean setDrawGLFunctionDetachedCallback(View view, Runnable cal lback) {
2249 return false; // Not supported yet.
2250 }
2251
2252 @Override
2251 public boolean requestDrawGL(Canvas canvas, boolean waitForCompletion, V iew containerView) { 2253 public boolean requestDrawGL(Canvas canvas, boolean waitForCompletion, V iew containerView) {
2252 if (mGLfunctor == null) { 2254 if (mGLfunctor == null) {
2253 mGLfunctor = new DrawGLFunctor( 2255 mGLfunctor = new DrawGLFunctor(
2254 mAwContents.getAwDrawGLViewContext(), mFactory.getWebVie wDelegate()); 2256 mAwContents.getAwDrawGLViewContext(), mFactory.getWebVie wDelegate());
2255 } 2257 }
2256 return mGLfunctor.requestDrawGL(canvas, containerView, waitForComple tion); 2258 return mGLfunctor.requestDrawGL(canvas, containerView, waitForComple tion);
2257 } 2259 }
2258 2260
2259 @Override 2261 @Override
2260 public void detachGLFunctor() { 2262 public void detachGLFunctor() {
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
2359 mAwContents.extractSmartClipData(x, y, width, height); 2361 mAwContents.extractSmartClipData(x, y, width, height);
2360 } 2362 }
2361 2363
2362 // Implements SmartClipProvider 2364 // Implements SmartClipProvider
2363 @Override 2365 @Override
2364 public void setSmartClipResultHandler(final Handler resultHandler) { 2366 public void setSmartClipResultHandler(final Handler resultHandler) {
2365 checkThread(); 2367 checkThread();
2366 mAwContents.setSmartClipResultHandler(resultHandler); 2368 mAwContents.setSmartClipResultHandler(resultHandler);
2367 } 2369 }
2368 } 2370 }
OLDNEW
« no previous file with comments | « no previous file | android_webview/java/src/org/chromium/android_webview/AwContents.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698