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

Side by Side Diff: chrome_frame/cfinstall/src/stub/frame.js

Issue 126143005: Remove Chrome Frame code and resources. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync to r244038 Created 6 years, 11 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 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 Implements some utilities for the legacy 'inline' and 'overlay'
7 * UI modes.
8 **/
9
10 goog.provide('google.cf.installer.frame');
11
12 /**
13 * Plucks properties from the passed arguments and sets them on the passed
14 * DOM node
15 * @param {Node} node The node to set properties on
16 * @param {Object} args A map of user-specified properties to set
17 */
18 google.cf.installer.frame.setProperties = function(node, args) {
19 var cssText = args['cssText'] || '';
20 node.style.cssText = ' ' + cssText;
21
22 var classText = args['className'] || '';
23 node.className = classText;
24
25 var srcNode = args['node'];
26 if (typeof srcNode == 'string')
27 srcNode = document.getElementById(srcNode);
28 return args['id'] || (srcNode ? srcNode['id'] || '' : '');
29 };
30
31 /**
32 * Determines the parent node to create the IFrame in, based on the provided
33 * arguments. Note that this should only be called once.
34 * @param {Object} args A map of user-specified properties.
35 */
36 google.cf.installer.frame.getParentNode = function(args) {
37 var srcNode = args['node'];
38 if (typeof srcNode == 'string')
39 srcNode = document.getElementById(srcNode);
40 if (srcNode) {
41 var parentNode = srcNode.parentNode;
42 parentNode.removeChild(srcNode);
43 return parentNode;
44 }
45 return document.body;
46 };
OLDNEW
« no previous file with comments | « chrome_frame/cfinstall/src/stub/chromeframe.js ('k') | chrome_frame/cfinstall/src/stub/inlinedelegate.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698