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

Side by Side Diff: extensions/renderer/resources/guest_view/surface_view/surface_view.js

Issue 1290013003: This patch removes all files, directories, flags, and code related to SurfaceWorker, which is now d… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: One more deletion. Created 5 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
« no previous file with comments | « extensions/renderer/resources/guest_view/guest_view_deny.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 // This module implements the SurfaceView prototype.
6
7 var GuestView = require('guestView').GuestView;
8 var GuestViewContainer = require('guestViewContainer').GuestViewContainer;
9
10 function SurfaceViewImpl(surfaceviewElement) {
11 GuestViewContainer.call(this, surfaceviewElement, 'surfaceview');
12 }
13
14 SurfaceViewImpl.prototype.__proto__ = GuestViewContainer.prototype;
15
16 SurfaceViewImpl.VIEW_TYPE = 'SurfaceView';
17
18 // Add extra functionality to |this.element|.
19 SurfaceViewImpl.setupElement = function(proto) {
20 var apiMethods = [
21 'connect'
22 ];
23
24 // Forward proto.foo* method calls to SurfaceViewImpl.foo*.
25 GuestViewContainer.forwardApiMethods(proto, apiMethods);
26 }
27
28 SurfaceViewImpl.prototype.buildContainerParams = function() {
29 return { 'url': this.url };
30 };
31
32 SurfaceViewImpl.prototype.connect = function(url, callback) {
33 if (!this.elementAttached) {
34 if (callback) {
35 callback(false);
36 }
37 return;
38 }
39
40 this.url = url;
41
42 this.guest.destroy();
43
44 this.guest.create(this.buildParams(), function() {
45 this.attachWindow$();
46 if (callback) {
47 callback(true);
48 }
49 }.bind(this));
50 };
51
52 GuestViewContainer.registerElement(SurfaceViewImpl);
OLDNEW
« no previous file with comments | « extensions/renderer/resources/guest_view/guest_view_deny.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698