| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // This module implements chrome-specific <webview> API. | 5 // This module implements chrome-specific <webview> API. |
| 6 // See web_view_api_methods.js for details. | 6 // See web_view_api_methods.js for details. |
| 7 | 7 |
| 8 var ChromeWebView = require('chromeWebViewInternal').ChromeWebView; | 8 var ChromeWebView = getInternalApi ? |
| 9 getInternalApi('chromeWebViewInternal') : |
| 10 require('chromeWebViewInternal').ChromeWebView; |
| 9 var ChromeWebViewSchema = | 11 var ChromeWebViewSchema = |
| 10 requireNative('schema_registry').GetSchema('chromeWebViewInternal'); | 12 requireNative('schema_registry').GetSchema('chromeWebViewInternal'); |
| 11 var CreateEvent = require('guestViewEvents').CreateEvent; | 13 var CreateEvent = require('guestViewEvents').CreateEvent; |
| 12 var EventBindings = require('event_bindings'); | 14 var EventBindings = require('event_bindings'); |
| 13 var GuestViewInternalNatives = requireNative('guest_view_internal'); | 15 var GuestViewInternalNatives = requireNative('guest_view_internal'); |
| 14 var idGeneratorNatives = requireNative('id_generator'); | 16 var idGeneratorNatives = requireNative('id_generator'); |
| 15 var utils = require('utils'); | 17 var utils = require('utils'); |
| 16 var WebViewImpl = require('webView').WebViewImpl; | 18 var WebViewImpl = require('webView').WebViewImpl; |
| 17 | 19 |
| 18 // This is the only "webViewInternal.onClicked" named event for this renderer. | 20 // This is the only "webViewInternal.onClicked" named event for this renderer. |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 'contextMenus', | 200 'contextMenus', |
| 199 { | 201 { |
| 200 get: createContextMenus(), | 202 get: createContextMenus(), |
| 201 enumerable: true | 203 enumerable: true |
| 202 }); | 204 }); |
| 203 }; | 205 }; |
| 204 | 206 |
| 205 function GetUniqueSubEventName(eventName) { | 207 function GetUniqueSubEventName(eventName) { |
| 206 return eventName + '/' + idGeneratorNatives.GetNextId(); | 208 return eventName + '/' + idGeneratorNatives.GetNextId(); |
| 207 } | 209 } |
| OLD | NEW |