1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // This module contains constants used in webview.
7 // Container for the webview constants.
8 var WebViewConstants = {
10 ATTRIBUTE_ALLOWTRANSPARENCY: 'allowtransparency',
11 ATTRIBUTE_ALLOWSCALING: 'allowscaling',
12 ATTRIBUTE_AUTOSIZE: 'autosize',
13 ATTRIBUTE_MAXHEIGHT: 'maxheight',
14 ATTRIBUTE_MAXWIDTH: 'maxwidth',
15 ATTRIBUTE_MINHEIGHT: 'minheight',
16 ATTRIBUTE_MINWIDTH: 'minwidth',
17 ATTRIBUTE_NAME: 'name',
18 ATTRIBUTE_PARTITION: 'partition',
21 // Error/warning messages.
22 ERROR_MSG_ALREADY_NAVIGATED: '<webview>: ' +
23 'The object has already navigated, so its partition cannot be changed.',
24 ERROR_MSG_CANNOT_INJECT_SCRIPT: '<webview>: ' +
25 'Script cannot be injected into content until the page has loaded.',
26 ERROR_MSG_CONTENTWINDOW_NOT_AVAILABLE: '<webview>: ' +
27 'contentWindow is not available at this time. It will become available ' +
28 'when the page has finished loading.',
29 ERROR_MSG_DIALOG_ACTION_ALREADY_TAKEN: '<webview>: ' +
30 'An action has already been taken for this "dialog" event.',
31 ERROR_MSG_NEWWINDOW_ACTION_ALREADY_TAKEN: '<webview>: ' +
32 'An action has already been taken for this "newwindow" event.',
33 ERROR_MSG_PERMISSION_ACTION_ALREADY_TAKEN: '<webview>: ' +
34 'Permission has already been decided for this "permissionrequest" event.',
35 ERROR_MSG_INVALID_PARTITION_ATTRIBUTE: '<webview>: ' +
36 'Invalid partition attribute.',
37 WARNING_MSG_DIALOG_REQUEST_BLOCKED: '<webview>: %1 %2 dialog was blocked.',
38 WARNING_MSG_NEWWINDOW_REQUEST_BLOCKED: '<webview>: A new window was blocked.',
39 WARNING_MSG_PERMISSION_REQUEST_BLOCKED: '<webview>: ' +
40 'The permission request for "%1" has been denied.'
43 exports.WebViewConstants = WebViewConstants;