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

Side by Side Diff: chrome_frame/cfinstall/src/stub/inlinedelegate.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
« no previous file with comments | « chrome_frame/cfinstall/src/stub/frame.js ('k') | chrome_frame/cfinstall/src/stub/installer.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a compatibility layer for older versions of
7 * CFInstall.js .
8 **/
9
10 goog.provide('google.cf.installer.InlineDelegate');
11
12 goog.require('goog.style');
13
14 goog.require('google.cf.installer.InteractionDelegate');
15 goog.require('google.cf.installer.frame');
16
17 /**
18 * Adds an unadorned iframe into the page, taking arguments to customize it.
19 * @param {Object} args A map of user-specified properties to set
20 * @constructor
21 * @implements {google.cf.installer.InteractionDelegate}
22 */
23 google.cf.installer.InlineDelegate = function(args) {
24 this.args_ = args;
25 this.args_.className = 'chromeFrameInstallDefaultStyle ' +
26 (this.args_.className || '');
27 };
28
29 /**
30 * Indicates whether the overlay CSS has already been injected.
31 * @type {boolean}
32 * @private
33 */
34 google.cf.installer.InlineDelegate.styleInjected_ = false;
35
36 /**
37 * Generates the CSS for the overlay.
38 * @private
39 */
40 google.cf.installer.InlineDelegate.injectCss_ = function() {
41 if (google.cf.installer.InlineDelegate.styleInjected_)
42 return;
43
44 goog.style.installStyles('.chromeFrameInstallDefaultStyle {' +
45 'width: 800px;' +
46 'height: 600px;' +
47 'position: absolute;' +
48 'left: 50%;' +
49 'top: 50%;' +
50 'margin-left: -400px;' +
51 'margin-top: -300px;' +
52 '}');
53 google.cf.installer.InlineDelegate.styleInjected_ = true;
54 };
55
56 /**
57 * @inheritDoc
58 */
59 google.cf.installer.InlineDelegate.prototype.getIFrameContainer = function() {
60 // TODO(user): This will append to the end of the container, whereas
61 // prior behaviour was beginning...
62 google.cf.installer.InlineDelegate.injectCss_();
63 return google.cf.installer.frame.getParentNode(this.args_);
64 };
65
66 /**
67 * @inheritDoc
68 */
69 google.cf.installer.InlineDelegate.prototype.customizeIFrame =
70 function(iframe) {
71 google.cf.installer.frame.setProperties(iframe, this.args_);
72 };
73
74 /**
75 * @inheritDoc
76 */
77 google.cf.installer.InlineDelegate.prototype.show = function() {
78 // TODO(user): Should start it out hidden and reveal/resize here.
79 };
80
81 /**
82 * @inheritDoc
83 */
84 google.cf.installer.InlineDelegate.prototype.reset =
85 function() {
86 // TODO(user): Should hide it here.
87 };
OLDNEW
« no previous file with comments | « chrome_frame/cfinstall/src/stub/frame.js ('k') | chrome_frame/cfinstall/src/stub/installer.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698