Home | History | Annotate | Download | only in extensions

Lines Matching refs:webview

5 // Shim that simulates a <webview> tag via Mutation Observers.
30 evt: createEvent('webview.onClose'),
34 evt: createEvent('webview.onConsoleMessage'),
38 evt: createEvent('webview.onContentLoad'),
42 evt: createEvent('webview.onExit'),
46 evt: createEvent('webview.onLoadAbort'),
50 customHandler: function(webview, event, webviewEvent) {
51 webview.currentEntryIndex_ = event.currentEntryIndex;
52 webview.entryCount_ = event.entryCount;
53 webview.processId_ = event.processId;
55 webview.browserPluginNode_.setAttribute('src', event.url);
57 webview.webviewNode_.dispatchEvent(webviewEvent);
59 evt: createEvent('webview.onLoadCommit'),
63 evt: createEvent('webview.onLoadRedirect'),
67 evt: createEvent('webview.onLoadStart'),
71 evt: createEvent('webview.onLoadStop'),
76 customHandler: function(webview, event, webviewEvent) {
77 webview.setupExtNewWindowEvent_(event, webviewEvent);
79 evt: createEvent('webview.onNewWindow'),
90 customHandler: function(webview, event, webviewEvent) {
91 webview.setupExtPermissionEvent_(event, webviewEvent);
93 evt: createEvent('webview.onPermissionRequest'),
103 evt: createEvent('webview.onResponsive'),
107 evt: createEvent('webview.onUnresponsive'),
112 addTagWatcher('WEBVIEW', function(addedNode) { new WebView(addedNode); });
115 WebView.prototype.entryCount_;
118 WebView.prototype.currentEntryIndex_;
121 WebView.prototype.processId_;
126 function WebView(webviewNode) {
145 WebView.prototype.createBrowserPluginNode_ = function() {
148 // The <object> node fills in the <webview> container.
173 WebView.prototype.setupFocusPropagation_ = function() {
175 // <webview> needs a tabIndex in order to respond to keyboard focus.
183 // Focus the BrowserPlugin when the <webview> takes focus.
187 // Blur the BrowserPlugin when the <webview> loses focus.
195 WebView.prototype.setupWebviewNodeMethods_ = function() {
228 chrome.webview.go(instanceId, relativeIndex);
236 chrome.webview.reload(instanceId);
244 chrome.webview.stop(instanceId);
252 chrome.webview.terminate(instanceId);
261 WebView.prototype.setupWebviewNodeProperties_ = function() {
262 var ERROR_MSG_CONTENTWINDOW_NOT_AVAILABLE = '<webview>: ' +
296 WebView.prototype.setupWebviewNodeAttributes_ = function() {
304 WebView.prototype.setupWebviewNodeObservers_ = function() {
305 // Map attribute modifications on the <webview> tag to property changes in
321 WebView.prototype.setupBrowserPluginNodeObservers_ = function() {
336 WebView.prototype.handleWebviewAttributeMutation_ = function(mutation) {
337 // This observer monitors mutations to attributes of the <webview> and
349 WebView.prototype.handleBrowserPluginAttributeMutation_ = function(mutation) {
351 // updates the <webview> attributes accordingly.
354 // from the <webview> as well.
357 // Update the <webview> attribute to match the BrowserPlugin attribute.
358 // Note: Calling setAttribute on <webview> will trigger its mutation
362 // loop. Thus, we avoid this loop by only updating the <webview> attribute
375 WebView.prototype.getWebviewExtEvents_ = function() {
386 WebView.prototype.setupWebviewNodeEvents_ = function() {
393 'api': 'webview',
414 WebView.prototype.setupExtEvent_ = function(eventName, eventInfo) {
438 WebView.prototype.setupEvent_ = function(eventName, attribs) {
454 WebView.prototype.setupExtNewWindowEvent_ = function(event, webviewEvent) {
455 var ERROR_MSG_NEWWINDOW_ACTION_ALREADY_TAKEN = '<webview>: ' +
458 var ERROR_MSG_NEWWINDOW_UNABLE_TO_ATTACH = '<webview>: ' +
459 'Unable to attach the new window to the provided webview.';
461 var ERROR_MSG_WEBVIEW_EXPECTED = '<webview> element expected.';
464 var WARNING_MSG_NEWWINDOW_BLOCKED = '<webview>: A new window was blocked.';
486 chrome.webview.setPermission(self.instanceId_, requestId, false, '');
499 attach: function(webview) {
501 if (!webview)
504 // to pick up the new webview before attach operates on it, if it hasn't
510 browserPluginNode['-internal-attachWindowTo'](webview,
515 // If the object being passed into attach is not a valid <webview>
519 chrome.webview.setPermission(self.instanceId_, requestId, attached, '');
524 chrome.webview
544 chrome.webview.setPermission(self.instanceId_, requestId, false, '');
552 WebView.prototype.setupExecuteCodeAPI_ = function() {
553 var ERROR_MSG_CANNOT_INJECT_SCRIPT = '<webview>: ' +
567 $Function.apply(chrome.webview.executeScript, null, args);
573 $Function.apply(chrome.webview.insertCSS, null, args);
580 WebView.prototype.getPermissionTypes_ = function() {
584 WebView.prototype.setupExtPermissionEvent_ = function(event, webviewEvent) {
585 var ERROR_MSG_PERMISSION_ALREADY_DECIDED = '<webview>: ' +
589 var WARNING_MSG_PERMISSION_DENIED = '<webview>: ' +
614 chrome.webview.setPermission(self.instanceId_, requestId, false, '');
629 chrome.webview.setPermission(self.instanceId_, requestId, true, '');
633 chrome.webview.setPermission(self.instanceId_, requestId, false, '');
653 chrome.webview.setPermission(self.instanceId_, requestId, false, '');
662 WebView.prototype.maybeSetupExperimentalAPI_ = function() {};
668 WebView.prototype.maybeSetupExtDialogEvent_ = function() {};
674 WebView.prototype.maybeGetWebviewExperimentalExtEvents_ = function() {};
676 exports.WebView = WebView;