summaryrefslogtreecommitdiffstats
path: root/extensions/renderer/resources/web_view_experimental.js
blob: c1246aecddaea2ff257f27d3655b00d60b7ea734 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright 2014 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 for details.
//
// <webview> Experimental API is only available on canary and dev channels of
// Chrome.

var WebViewInternal = require('webView').WebViewInternal;

WebViewInternal.prototype.maybeGetExperimentalEvents = function() {
  return {};
};

/** @private */
WebViewInternal.prototype.maybeGetExperimentalPermissions = function() {
  return [];
};

/** @private */
WebViewInternal.prototype.captureVisibleRegion = function(spec, callback) {
  WebView.captureVisibleRegion(this.guestInstanceId, spec, callback);
};

WebViewInternal.maybeRegisterExperimentalAPIs = function(proto) {
  proto.captureVisibleRegion = function(spec, callback) {
    privates(this).internal.captureVisibleRegion(spec, callback);
  };
};