Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / content / public / android / java / src / org / chromium / content / browser / ContentViewClient.java
index 06e051b..f870651 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2012 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
@@ -52,15 +52,6 @@ public class ContentViewClient {
             float topControlsOffsetYPix, float contentOffsetYPix, float overdrawBottomHeightPix) {
     }
 
-    /**
-     * Notifies the client that the renderer backing the ContentView has crashed.
-     * @param crashedWhileOomProtected True iff the renderer died while being bound with a high
-     * priority binding, which indicates that it was probably an actual crash (as opposed to the
-     * renderer being killed by the OS out-of-memory killer).
-     */
-    public void onRendererCrash(boolean processWasOomProtected) {
-    }
-
     public boolean shouldOverrideKeyEvent(KeyEvent event) {
         int keyCode = event.getKeyCode();
         // We need to send almost every key to WebKit. However:
@@ -96,8 +87,10 @@ public class ContentViewClient {
         return false;
     }
 
-    // Called when an ImeEvent is sent to the page. Can be used to know when some text is entered
-    // in a page.
+    /**
+     * Called when an ImeEvent is sent to the page. Can be used to know when some text is entered
+     * in a page.
+     */
     public void onImeEvent() {
     }
 
@@ -110,20 +103,6 @@ public class ContentViewClient {
     public void onImeStateChangeRequested(boolean requestShow) {
     }
 
-    // TODO (dtrainor): Should expose getScrollX/Y from ContentView or make
-    // computeHorizontalScrollOffset()/computeVerticalScrollOffset() public.
-    /**
-     * Gives the UI the chance to override each scroll event.
-     * @param dx The amount scrolled in the X direction (in physical pixels).
-     * @param dy The amount scrolled in the Y direction (in physical pixels).
-     * @param scrollX The current X scroll offset (in physical pixels).
-     * @param scrollY The current Y scroll offset (in physical pixels).
-     * @return Whether or not the UI consumed and handled this event.
-     */
-    public boolean shouldOverrideScroll(float dx, float dy, float scrollX, float scrollY) {
-        return false;
-    }
-
     /**
      * Returns an ActionMode.Callback for in-page selection.
      */
@@ -191,4 +170,14 @@ public class ContentViewClient {
     public ContentVideoViewClient getContentVideoViewClient() {
         return null;
     }
+
+    /**
+     * Called when BrowserMediaPlayerManager wants to load a media resource.
+     * @param url the URL of media resource to load.
+     * @return true to prevent the resource from being loaded.
+     */
+    public boolean shouldBlockMediaRequest(String url) {
+        return false;
+    }
+
 }