summaryrefslogtreecommitdiffstats
path: root/extensions/renderer
diff options
context:
space:
mode:
authortsergeant <tsergeant@chromium.org>2016-01-20 22:50:55 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-21 06:51:48 +0000
commitb30b1aaf04cb1cae5c455461c8c5c418dd7c2aea (patch)
treef4c83081cb42e29ff0397cda21c6597654e7ea4b /extensions/renderer
parentc858541bed56840fbab83ed5476652a00c2f8e90 (diff)
downloadchromium_src-b30b1aaf04cb1cae5c455461c8c5c418dd7c2aea.zip
chromium_src-b30b1aaf04cb1cae5c455461c8c5c418dd7c2aea.tar.gz
chromium_src-b30b1aaf04cb1cae5c455461c8c5c418dd7c2aea.tar.bz2
Revert of Implement webview.captureVisibleRegion() (patchset #9 id:160001 of https://codereview.chromium.org/1582053002/ )
Reason for revert: The test WebViewAPITest.TestCaptureVisibleRegion is failing on several windows bots: https://build.chromium.org/p/chromium.win/builders/Win7%20Tests%20%28dbg%29%281%29/builds/45040 https://build.chromium.org/p/chromium.win/builders/XP%20Tests%20%281%29/builds/42690 https://build.chromium.org/p/chromium.win/builders/Vista%20Tests%20%281%29/builds/64394 Original issue's description: > Implement webview.captureVisibleRegion() > > This CL implements webview.captureVisibleRegion(), an extension/apps > API to allow WebView users to capture screenshots of the contents > displayed in a WebView. The surfaces contents capture has been plumbed > via RenderWidgetHostViewChildFrame so this implementation should not > require changes when WebView switches to using OOPIF. > > As part of the implementation, there are two notable refactors: > > 1) CaptureWebContentsFunction has been refactored into > WebContentsCaptureClient to remove the extensions::AsyncExtensionFunction > dependence so that this code can be used by both tabs.captureVisibleTab > and webview.captureVisibleRegion, and > > 2) common code from DelegatedFrameHost has ben moved to > content/browser/compositor/surface_utils.* in order to avoid duplication > as both DelegatedFrameHost and RenderWidgetHostViewChildFrame now > use the code. > > BUG=326755 > > Committed: https://crrev.com/5b8cdcc82fc9da7bab15fd3dbf65df843dc73589 > Cr-Commit-Position: refs/heads/master@{#370565} TBR=rockot@chromium.org,creis@chromium.org,kenrb@chromium.org,nick@chromium.org,fsamuel@chromium.org,wjmaclean@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=326755 Review URL: https://codereview.chromium.org/1614703003 Cr-Commit-Position: refs/heads/master@{#370641}
Diffstat (limited to 'extensions/renderer')
-rw-r--r--extensions/renderer/dispatcher.cc6
-rw-r--r--extensions/renderer/resources/extensions_renderer_resources.grd1
-rw-r--r--extensions/renderer/resources/guest_view/web_view/web_view.js8
-rw-r--r--extensions/renderer/resources/guest_view/web_view/web_view_experimental.js24
4 files changed, 0 insertions, 39 deletions
diff --git a/extensions/renderer/dispatcher.cc b/extensions/renderer/dispatcher.cc
index bdfa298..7ec76ad 100644
--- a/extensions/renderer/dispatcher.cc
+++ b/extensions/renderer/dispatcher.cc
@@ -644,8 +644,6 @@ std::vector<std::pair<std::string, int> > Dispatcher::GetJsResources() {
resources.push_back(std::make_pair("webViewEvents", IDR_WEB_VIEW_EVENTS_JS));
resources.push_back(std::make_pair("webViewInternal",
IDR_WEB_VIEW_INTERNAL_CUSTOM_BINDINGS_JS));
- resources.push_back(std::make_pair("webViewExperimental",
- IDR_WEB_VIEW_EXPERIMENTAL_JS));
if (content::BrowserPluginGuestMode::UseCrossProcessFramesForGuests()) {
resources.push_back(std::make_pair("webViewIframe",
IDR_WEB_VIEW_IFRAME_JS));
@@ -1599,10 +1597,6 @@ void Dispatcher::RequireGuestViewModules(ScriptContext* context) {
module_system->Require("webView");
module_system->Require("webViewApiMethods");
module_system->Require("webViewAttributes");
- if (context->GetAvailability("webViewExperimentalInternal")
- .is_available()) {
- module_system->Require("webViewExperimental");
- }
if (content::BrowserPluginGuestMode::UseCrossProcessFramesForGuests()) {
module_system->Require("webViewIframe");
diff --git a/extensions/renderer/resources/extensions_renderer_resources.grd b/extensions/renderer/resources/extensions_renderer_resources.grd
index b4f5dad..bad8e29 100644
--- a/extensions/renderer/resources/extensions_renderer_resources.grd
+++ b/extensions/renderer/resources/extensions_renderer_resources.grd
@@ -61,7 +61,6 @@
<include name="IDR_WEB_VIEW_ATTRIBUTES_JS" file="guest_view/web_view/web_view_attributes.js" type="BINDATA" />
<include name="IDR_WEB_VIEW_CONSTANTS_JS" file="guest_view/web_view/web_view_constants.js" type="BINDATA" />
<include name="IDR_WEB_VIEW_EVENTS_JS" file="guest_view/web_view/web_view_events.js" type="BINDATA" />
- <include name="IDR_WEB_VIEW_EXPERIMENTAL_JS" file="guest_view/web_view/web_view_experimental.js" type="BINDATA" />
<include name="IDR_WEB_VIEW_IFRAME_JS" file="guest_view/web_view/web_view_iframe.js" type="BINDATA" />
<include name="IDR_WEB_VIEW_INTERNAL_CUSTOM_BINDINGS_JS" file="guest_view/web_view/web_view_internal.js" type="BINDATA" />
<include name="IDR_WEB_VIEW_JS" file="guest_view/web_view/web_view.js" type="BINDATA" />
diff --git a/extensions/renderer/resources/guest_view/web_view/web_view.js b/extensions/renderer/resources/guest_view/web_view/web_view.js
index d55249f..6dd4fae 100644
--- a/extensions/renderer/resources/guest_view/web_view/web_view.js
+++ b/extensions/renderer/resources/guest_view/web_view/web_view.js
@@ -31,11 +31,6 @@ WebViewImpl.setupElement = function(proto) {
// Public-facing API methods.
var apiMethods = WebViewImpl.getApiMethods();
- // Add the experimental API methods, if available.
- var experimentalApiMethods =
- WebViewImpl.maybeGetExperimentalApiMethods();
- apiMethods = $Array.concat(apiMethods, experimentalApiMethods);
-
// Create default implementations for undefined API methods.
var createDefaultApiMethod = function(m) {
return function(var_args) {
@@ -225,9 +220,6 @@ WebViewImpl.prototype.makeElementFullscreen = function() {
// Implemented when the ChromeWebView API is available.
WebViewImpl.prototype.maybeSetupContextMenus = function() {};
-// Implemented when the experimental WebView API is available.
-WebViewImpl.maybeGetExperimentalApiMethods = function() { return []; };
-
GuestViewContainer.registerElement(WebViewImpl);
// Exports.
diff --git a/extensions/renderer/resources/guest_view/web_view/web_view_experimental.js b/extensions/renderer/resources/guest_view/web_view/web_view_experimental.js
deleted file mode 100644
index 96331df..0000000
--- a/extensions/renderer/resources/guest_view/web_view/web_view_experimental.js
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2015 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.
-
-// This module implements experimental API for <webview>.
-// See web_view.js and web_view_api_methods.js for details.
-//
-// <webview> Experimental API is only available on canary and channels of
-// Chrome.
-
-var WebViewImpl = require('webView').WebViewImpl;
-var WebViewInternal = require('webViewInternal').WebViewInternal;
-
-// An array of <webview>'s experimental API methods. See |WEB_VIEW_API_METHODS|
-// in web_view_api_methods.js for more details.
-var WEB_VIEW_EXPERIMENTAL_API_METHODS = [
- // Captures the visible region of the WebView contents into a bitmap.
- 'captureVisibleRegion'
-];
-
-// Registers the experimantal WebVIew API when available.
-WebViewImpl.maybeGetExperimentalApiMethods = function() {
- return WEB_VIEW_EXPERIMENTAL_API_METHODS;
-};