| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2017 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 /** |
| 6 * @fileoverview Collection of legacy APIs that should eventually be cleaned up. |
| 7 */ |
| 8 |
| 9 goog.provide('__crWeb.legacy'); |
| 10 |
| 11 goog.require('__crWeb.common'); |
| 12 goog.require('__crWeb.message'); |
| 13 |
| 14 /** Beginning of anonymouse object */ |
| 15 (function() { |
| 16 |
| 17 /** |
| 18 * Handles document load completion tasks. Invoked from |
| 19 * [WKNavigationDelegate webView:didFinishNavigation:], when document load is |
| 20 * complete. |
| 21 * TODO(crbug.com/546350): Investigate using |
| 22 * WKUserScriptInjectionTimeAtDocumentEnd to inject this material at the |
| 23 * appropriate time so that this API will not be needed. |
| 24 */ |
| 25 __gCrWeb.didFinishNavigation = function() { |
| 26 // Send the favicons to the browser. |
| 27 __gCrWeb.message.invokeOnHost({'command': 'document.favicons', |
| 28 'favicons': __gCrWeb.common.getFavicons()}); |
| 29 |
| 30 // Add placeholders for plugin content. |
| 31 if (__gCrWeb.common.updatePluginPlaceholders()) |
| 32 __gCrWeb.message.invokeOnHost({'command': 'addPluginPlaceholders'}); |
| 33 } |
| 34 |
| 35 }()); // End of anonymouse object |
| OLD | NEW |