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

Side by Side Diff: android_webview/java/src/org/chromium/android_webview/AwContents.java

Issue 425343002: [Android WebView] API to enable fullscreen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 6 years, 4 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 org.chromium.android_webview; 5 package org.chromium.android_webview;
6 6
7 import android.annotation.SuppressLint; 7 import android.annotation.SuppressLint;
8 import android.app.Activity; 8 import android.app.Activity;
9 import android.content.ComponentCallbacks2; 9 import android.content.ComponentCallbacks2;
10 import android.content.Context; 10 import android.content.Context;
(...skipping 2151 matching lines...) Expand 10 before | Expand all | Expand 10 after
2162 } 2162 }
2163 2163
2164 public void extractSmartClipData(int x, int y, int width, int height) { 2164 public void extractSmartClipData(int x, int y, int width, int height) {
2165 mContentViewCore.extractSmartClipData(x, y, width, height); 2165 mContentViewCore.extractSmartClipData(x, y, width, height);
2166 } 2166 }
2167 2167
2168 public void setSmartClipDataListener(ContentViewCore.SmartClipDataListener l istener) { 2168 public void setSmartClipDataListener(ContentViewCore.SmartClipDataListener l istener) {
2169 mContentViewCore.setSmartClipDataListener(listener); 2169 mContentViewCore.setSmartClipDataListener(listener);
2170 } 2170 }
2171 2171
2172 public void setFullScreenEnabled(boolean enable) {
2173 mSettings.setFullScreenEnabled(enable);
2174 }
2175
2172 // ------------------------------------------------------------------------- ------------------- 2176 // ------------------------------------------------------------------------- -------------------
2173 // This is the AwViewMethods implementation that does real work. The AwViewM ethodsImpl is 2177 // This is the AwViewMethods implementation that does real work. The AwViewM ethodsImpl is
2174 // hooked up to the WebView in embedded mode and to the FullScreenView in fu llscreen mode, 2178 // hooked up to the WebView in embedded mode and to the FullScreenView in fu llscreen mode,
2175 // but not to both at the same time. 2179 // but not to both at the same time.
2176 private class AwViewMethodsImpl implements AwViewMethods { 2180 private class AwViewMethodsImpl implements AwViewMethods {
2177 private int mLayerType = View.LAYER_TYPE_NONE; 2181 private int mLayerType = View.LAYER_TYPE_NONE;
2178 private ComponentCallbacks2 mComponentCallbacks; 2182 private ComponentCallbacks2 mComponentCallbacks;
2179 2183
2180 // Only valid within software onDraw(). 2184 // Only valid within software onDraw().
2181 private final Rect mClipBoundsTemporary = new Rect(); 2185 private final Rect mClipBoundsTemporary = new Rect();
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
2484 2488
2485 private native void nativeSetJsOnlineProperty(long nativeAwContents, boolean networkUp); 2489 private native void nativeSetJsOnlineProperty(long nativeAwContents, boolean networkUp);
2486 2490
2487 private native void nativeTrimMemory(long nativeAwContents, int level, boole an visible); 2491 private native void nativeTrimMemory(long nativeAwContents, int level, boole an visible);
2488 2492
2489 private native void nativeCreatePdfExporter(long nativeAwContents, AwPdfExpo rter awPdfExporter); 2493 private native void nativeCreatePdfExporter(long nativeAwContents, AwPdfExpo rter awPdfExporter);
2490 2494
2491 private native void nativePreauthorizePermission(long nativeAwContents, Stri ng origin, 2495 private native void nativePreauthorizePermission(long nativeAwContents, Stri ng origin,
2492 long resources); 2496 long resources);
2493 } 2497 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698