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

Unified Diff: extensions/renderer/resources/guest_view/guest_view.js

Issue 847893002: Implemented explicit resizing from guestview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another small fix. Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: extensions/renderer/resources/guest_view/guest_view.js
diff --git a/extensions/renderer/resources/guest_view/guest_view.js b/extensions/renderer/resources/guest_view/guest_view.js
index 24c0c7c478a7fb668310177dd6cca7269b0ce33e..4e572a20ef19f9b735fac9552e47c314d6f7c09a 100644
--- a/extensions/renderer/resources/guest_view/guest_view.js
+++ b/extensions/renderer/resources/guest_view/guest_view.js
@@ -80,7 +80,7 @@ GuestViewImpl.prototype.checkState = function(action) {
'create': [null, ERROR_MSG_ALREADY_CREATED, ERROR_MSG_ALREADY_CREATED],
'destroy': [null, null, null],
'detach': [ERROR_MSG_NOT_ATTACHED, ERROR_MSG_NOT_ATTACHED, null],
- 'setAutoSize': [ERROR_MSG_NOT_CREATED, null, null]
+ 'setSize': [ERROR_MSG_NOT_CREATED, null, null]
};
// Check that the proposed action is a real action.
@@ -212,16 +212,16 @@ GuestViewImpl.prototype.detachImpl = function(callback) {
this.state = GUEST_STATE_CREATED;
};
-// Internal implementation of setAutoSize().
-GuestViewImpl.prototype.setAutoSizeImpl = function(autoSizeParams, callback) {
+// Internal implementation of setSize().
+GuestViewImpl.prototype.setSizeImpl = function(sizeParams, callback) {
// Check the current state.
- if (!this.checkState('setAutoSize')) {
+ if (!this.checkState('setSize')) {
this.handleCallback(callback);
return;
}
- GuestViewInternal.setAutoSize(this.id, autoSizeParams,
- this.handleCallback.bind(this, callback));
+ GuestViewInternal.setSize(this.id, sizeParams,
+ this.handleCallback.bind(this, callback));
};
// The exposed interface to a guestview. Exposes in its API the functions
@@ -265,10 +265,10 @@ GuestView.prototype.detach = function(callback) {
};
// Adjusts the guestview's sizing parameters.
-GuestView.prototype.setAutoSize = function(autoSizeParams, callback) {
+GuestView.prototype.setSize = function(sizeParams, callback) {
var internal = privates(this).internal;
- internal.actionQueue.push(internal.setAutoSizeImpl.bind(
- internal, autoSizeParams, callback));
+ internal.actionQueue.push(internal.setSizeImpl.bind(
+ internal, sizeParams, callback));
internal.performNextAction();
};
« no previous file with comments | « extensions/common/guest_view/guest_view_constants.cc ('k') | extensions/renderer/resources/guest_view/guest_view_container.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698