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

Side by Side Diff: extensions/renderer/resources/guest_view/web_view/web_view_iframe.js

Issue 1165773004: Extract the element implementation logic to function mods in <webview>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@qui
Patch Set: rename all attachWindow -> attachWindow$ Created 5 years, 6 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/web_view/web_view_action_requests.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 2015 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 provides OOPIF overrides for WebView (<webview>).
paulmeyer 2015/06/08 13:37:38 nit: choose one of 'implements' or 'provides'. Al
lazyboy 2015/06/09 18:48:22 Done.
6 // See web_view.js for details.
7
8 var IdGenerator = requireNative('id_generator');
9 var WebViewImpl = require('webView').WebViewImpl;
10 // NOTE: Do not remove these, we implicitly depend on these in
11 // --site-per-process.
12 var GuestViewIframe = require('guestViewIframe');
13 var GuestViewIframeContainer = require('guestViewIframeContainer');
14
15 WebViewImpl.prototype.attachWindow$ = function(opt_guestInstanceId) {
16 // If |opt_guestInstanceId| was provided, then a different existing guest is
17 // being attached to this webview, and the current one will get destroyed.
18 if (opt_guestInstanceId) {
19 if (this.guest.getId() == opt_guestInstanceId) {
20 return true;
21 }
22 this.guest.destroy();
23 this.guest = new GuestView('webview', opt_guestInstanceId);
24 }
25
26 var generatedID = IdGenerator.GetNextId();
27 // We do have a plugin to set our instance id, so do it here.
28 this.onInternalInstanceID(generatedID);
29 return true;
30 };
OLDNEW
« no previous file with comments | « extensions/renderer/resources/guest_view/web_view/web_view_action_requests.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698