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

Unified Diff: ios/web/web_state/js/resources/legacy.js

Issue 2810263002: Deprecate __gCrWeb['sendFaviconsToHost'] by inlining it. (Closed)
Patch Set: Moved didFinishNavigation to legacy.js Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/web/web_state/js/resources/core.js ('k') | ios/web/web_state/js/resources/navigation.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/web_state/js/resources/legacy.js
diff --git a/ios/web/web_state/js/resources/legacy.js b/ios/web/web_state/js/resources/legacy.js
new file mode 100644
index 0000000000000000000000000000000000000000..ccf34de37a4e001da40fa767aa9f7373bd056651
--- /dev/null
+++ b/ios/web/web_state/js/resources/legacy.js
@@ -0,0 +1,35 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+/**
+ * @fileoverview Collection of legacy APIs that should eventually be cleaned up.
+ */
+
+goog.provide('__crWeb.legacy');
+
+goog.require('__crWeb.common');
+goog.require('__crWeb.message');
+
+/** Beginning of anonymouse object */
+(function() {
+
+ /**
+ * Handles document load completion tasks. Invoked from
+ * [WKNavigationDelegate webView:didFinishNavigation:], when document load is
+ * complete.
+ * TODO(crbug.com/546350): Investigate using
+ * WKUserScriptInjectionTimeAtDocumentEnd to inject this material at the
+ * appropriate time so that this API will not be needed.
+ */
+ __gCrWeb.didFinishNavigation = function() {
+ // Send the favicons to the browser.
+ __gCrWeb.message.invokeOnHost({'command': 'document.favicons',
+ 'favicons': __gCrWeb.common.getFavicons()});
+
+ // Add placeholders for plugin content.
+ if (__gCrWeb.common.updatePluginPlaceholders())
+ __gCrWeb.message.invokeOnHost({'command': 'addPluginPlaceholders'});
+ }
+
+}()); // End of anonymouse object
« no previous file with comments | « ios/web/web_state/js/resources/core.js ('k') | ios/web/web_state/js/resources/navigation.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698