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 // Scripts for the message handler for use with UIWebView. | 5 // Scripts for the message handler for use with UIWebView. |
6 | 6 |
| 7 goog.provide('__crweb.message_dynamic_ui'); |
| 8 |
7 /** | 9 /** |
8 * Namespace for this module. | 10 * Namespace for this module. |
9 */ | 11 */ |
10 __gCrWeb.message_dynamic = {}; | 12 __gCrWeb.message_dynamic = {}; |
11 | 13 |
12 /* Beginning of anonymous object. */ | 14 /* Beginning of anonymous object. */ |
13 new function() { | 15 new function() { |
14 /** | 16 /** |
15 * Sends queued commands to the Objective-C side. | 17 * Sends queued commands to the Objective-C side. |
16 * @param {Object} queueObject Queue object containing messages to send. | 18 * @param {Object} queueObject Queue object containing messages to send. |
(...skipping 12 matching lines...) Expand all Loading... |
29 | 31 |
30 var frame = document.createElement('iframe'); | 32 var frame = document.createElement('iframe'); |
31 frame.style.display = 'none'; | 33 frame.style.display = 'none'; |
32 frame.src = queueObject.scheme + '://' + __gCrWeb.windowId + '#' + | 34 frame.src = queueObject.scheme + '://' + __gCrWeb.windowId + '#' + |
33 encodeURIComponent(__gCrWeb.common.JSONStringify(queueObject.queue)); | 35 encodeURIComponent(__gCrWeb.common.JSONStringify(queueObject.queue)); |
34 queueObject.reset(); | 36 queueObject.reset(); |
35 document.body.appendChild(frame); | 37 document.body.appendChild(frame); |
36 document.body.removeChild(frame); | 38 document.body.removeChild(frame); |
37 }; | 39 }; |
38 } | 40 } |
OLD | NEW |