Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(354)

Side by Side Diff: ios/web/web_state/js/resources/window_id.js

Issue 1029983002: Upstream ios/web/ JS files (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 // This file adheres to closure-compiler conventions in order to enable
6 // compilation with ADVANCED_OPTIMIZATIONS. See http://goo.gl/FwOgy
7
8 // Script to set windowId.
9
10
11 // Namespace for module, used as presence beacon for injection checks.
12 __gCrWeb['windowIdObject'] = {};
13
14 new function() {
15 // CRWJSWindowIdManager replaces $(WINDOW_ID) with appropriate string upon
16 // injection.
17 __gCrWeb['windowId'] = '$(WINDOW_ID)';
18
19 // Wrap queues flushing in setTimeout to avoid reentrant calls.
20 // In some circumstances setTimeout does not work on iOS8 if set from
21 // injected script. There is an assumption that it's happen when the script
22 // has been injected too early. Do not place anything important to delayed
23 // function body, since there is no guarantee that it will ever be executed.
24 // TODO(eugenebut): Find out why setTimeout does not work (crbug.com/402682).
25 window.setTimeout(function() {
26 // Send messages queued since message.js injection.
27 if (__gCrWeb.message) {
28 __gCrWeb.message.invokeQueues();
29 }
30 }, 0);
31 }
OLDNEW
« no previous file with comments | « ios/web/web_state/js/resources/web_bundle_wk.js ('k') | ios/web/web_state/js/resources/window_open_ui.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698