- loadFrame_: function() {
- var gaiaFrame = $('gaia-frame');
- gaiaFrame.partition = this.partitionId_;
- gaiaFrame.src = this.initialFrameUrl_;
- if (this.inlineMode_) {
- gaiaFrame.addEventListener(
- 'loadstop', this.onWebviewLoadstop_.bind(this, gaiaFrame));
- gaiaFrame.addEventListener(
- 'newwindow', this.onWebviewNewWindow_.bind(this, gaiaFrame));
- }
- if (this.constrained_) {
- gaiaFrame.request.onCompleted.addListener(
- this.onWebviewRequestCompleted_.bind(this),
- {urls: ['<all_urls>'], types: ['main_frame']},
- ['responseHeaders']);
- }
+ /**
+ * Invoked when the background script sends a message to indicate that the
+ * current content does not fit in a constrained window.
+ * @param {Object=} opt_extraMsg Optional extra info to send.
+ */
+ switchToFullTab_: function(msg) {
+ var parentMsg = {
+ 'method': 'switchToFullTab',
+ 'url': msg.url
+ };
+ window.parent.postMessage(parentMsg, this.parentPage_);