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

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

Issue 1288063006: Move GuestView code from WebView-specific web_view_iframe.js into (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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_iframe_container.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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This module provides --site-per-process overrides for WebView (<webview>). 5 // This module provides --site-per-process overrides for WebView (<webview>).
6 // See web_view.js for details. 6 // See web_view.js for details.
7 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 8 // NOTE: Do not remove these, we implicitly depend on these in
11 // --site-per-process. 9 // --site-per-process.
12 var GuestViewIframe = require('guestViewIframe'); 10 var GuestViewIframe = require('guestViewIframe');
13 var GuestViewIframeContainer = require('guestViewIframeContainer'); 11 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 // Generate an instance id for the container.
28 this.onInternalInstanceId(generatedId);
29 return true;
30 };
OLDNEW
« no previous file with comments | « extensions/renderer/resources/guest_view/guest_view_iframe_container.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698