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

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

Issue 972313002: Make <webview> use out-of-process iframe architecture. (Closed) Base URL: ssh://saopaulo.wat/mnt/dev/shared/src@testoopif2z-better-chrome
Patch Set: Rebase after swapped out changes major rework with RFP 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
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 // --site-per-process overrides for guest_view.js. 5 // --site-per-process overrides for guest_view.js.
6 6
7 var GuestView = require('guestView').GuestView; 7 var GuestView = require('guestView').GuestView;
8 var GuestViewImpl = require('guestView').GuestViewImpl; 8 var GuestViewImpl = require('guestView').GuestViewImpl;
9 var GuestViewInternalNatives = requireNative('guest_view_internal'); 9 var GuestViewInternalNatives = requireNative('guest_view_internal');
10 var ResizeEvent = require('guestView').ResizeEvent; 10 var ResizeEvent = require('guestView').ResizeEvent;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 } else { 42 } else {
43 // Only update the contentWindow if attaching is successful. 43 // Only update the contentWindow if attaching is successful.
44 this.contentWindow = contentWindow; 44 this.contentWindow = contentWindow;
45 } 45 }
46 46
47 this.handleCallback(callback); 47 this.handleCallback(callback);
48 }; 48 };
49 49
50 attachParams['instanceId'] = viewInstanceId; 50 attachParams['instanceId'] = viewInstanceId;
51 var contentWindow = getIframeContentWindow(viewInstanceId); 51 var contentWindow = getIframeContentWindow(viewInstanceId);
52 // TODO(lazyboy): Call binding function to attach this guest. 52 // |contentWindow| is used to retrieve the RenderFrame in cpp.
53 // |contentWindow| should be used to retrieve the RenderFrame in cpp. 53 window.console.log('contentWindow stuff **** WHEEE');
54 window.console.log(contentWindow);
55 GuestViewInternalNatives.AttachIframeGuest(
56 internalInstanceId, this.id, attachParams, contentWindow,
57 callbackWrapper.bind(this, callback));
54 58
55 this.internalInstanceId = internalInstanceId; 59 this.internalInstanceId = internalInstanceId;
56 this.state = GuestViewImpl.GuestState.GUEST_STATE_ATTACHED; 60 this.state = GuestViewImpl.GuestState.GUEST_STATE_ATTACHED;
57 61
58 // Detach automatically when the container is destroyed. 62 // Detach automatically when the container is destroyed.
59 GuestViewInternalNatives.RegisterDestructionCallback( 63 GuestViewInternalNatives.RegisterDestructionCallback(
60 internalInstanceId, this.weakWrapper(function() { 64 internalInstanceId, this.weakWrapper(function() {
61 if (this.state != GuestViewImpl.GuestState.GUEST_STATE_ATTACHED || 65 if (this.state != GuestViewImpl.GuestState.GUEST_STATE_ATTACHED ||
62 this.internalInstanceId != internalInstanceId) { 66 this.internalInstanceId != internalInstanceId) {
63 return; 67 return;
(...skipping 25 matching lines...) Expand all
89 } 93 }
90 94
91 ResizeEvent.addListener(this.callOnResize, {instanceId: this.id}); 95 ResizeEvent.addListener(this.callOnResize, {instanceId: this.id});
92 this.handleCallback(callback); 96 this.handleCallback(callback);
93 }; 97 };
94 98
95 this.sendCreateRequest(createParams, callbackWrapper.bind(this, callback)); 99 this.sendCreateRequest(createParams, callbackWrapper.bind(this, callback));
96 100
97 this.state = GuestViewImpl.GuestState.GUEST_STATE_CREATED; 101 this.state = GuestViewImpl.GuestState.GUEST_STATE_CREATED;
98 }; 102 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698