summaryrefslogtreecommitdiff
path: root/chromium/chrome/browser/resources/chromeos/first_run
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/chrome/browser/resources/chromeos/first_run')
-rw-r--r--chromium/chrome/browser/resources/chromeos/first_run/OWNERS1
-rw-r--r--chromium/chrome/browser/resources/chromeos/first_run/app/background.js13
-rw-r--r--chromium/chrome/browser/resources/chromeos/first_run/app/greeting_image_disabled.html1
-rw-r--r--chromium/chrome/browser/resources/chromeos/first_run/app/greeting_image_enabled.html5
-rw-r--r--chromium/chrome/browser/resources/chromeos/first_run/app/icon/128.pngbin3379 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/first_run/app/icon/16.pngbin559 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/first_run/app/icon/256.pngbin6398 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/first_run/app/icon/32.pngbin931 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/first_run/app/icon/48.pngbin1321 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/first_run/app/icon/64.pngbin1870 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/first_run/app/icon/96.pngbin2623 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/first_run/app/main.html42
-rw-r--r--chromium/chrome/browser/resources/chromeos/first_run/app/main.js36
-rw-r--r--chromium/chrome/browser/resources/chromeos/first_run/app/style.css74
-rw-r--r--chromium/chrome/browser/resources/chromeos/first_run/app_list_step.html11
-rw-r--r--chromium/chrome/browser/resources/chromeos/first_run/background.svg14
-rw-r--r--chromium/chrome/browser/resources/chromeos/first_run/bubble.css51
-rw-r--r--chromium/chrome/browser/resources/chromeos/first_run/first_run.css76
-rw-r--r--chromium/chrome/browser/resources/chromeos/first_run/first_run.html31
-rw-r--r--chromium/chrome/browser/resources/chromeos/first_run/first_run.js275
-rw-r--r--chromium/chrome/browser/resources/chromeos/first_run/help_step.html12
-rw-r--r--chromium/chrome/browser/resources/chromeos/first_run/preload.css53
-rw-r--r--chromium/chrome/browser/resources/chromeos/first_run/step.css40
-rw-r--r--chromium/chrome/browser/resources/chromeos/first_run/step.js300
-rw-r--r--chromium/chrome/browser/resources/chromeos/first_run/step_bubble.css51
-rw-r--r--chromium/chrome/browser/resources/chromeos/first_run/tray_step.html8
26 files changed, 0 insertions, 1094 deletions
diff --git a/chromium/chrome/browser/resources/chromeos/first_run/OWNERS b/chromium/chrome/browser/resources/chromeos/first_run/OWNERS
deleted file mode 100644
index df660f70946..00000000000
--- a/chromium/chrome/browser/resources/chromeos/first_run/OWNERS
+++ /dev/null
@@ -1 +0,0 @@
-dzhioev@chromium.org
diff --git a/chromium/chrome/browser/resources/chromeos/first_run/app/background.js b/chromium/chrome/browser/resources/chromeos/first_run/app/background.js
deleted file mode 100644
index 5d1ba842e5d..00000000000
--- a/chromium/chrome/browser/resources/chromeos/first_run/app/background.js
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2013 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.
-
-chrome.app.runtime.onLaunched.addListener(function() {
- chrome.app.window.create('main.html', {
- 'frame': 'none',
- 'resizable': false,
- 'hidden': true,
- }, function(appWindow) {
- appWindow.contentWindow.appWindow = appWindow;
- });
-});
diff --git a/chromium/chrome/browser/resources/chromeos/first_run/app/greeting_image_disabled.html b/chromium/chrome/browser/resources/chromeos/first_run/app/greeting_image_disabled.html
deleted file mode 100644
index 8b137891791..00000000000
--- a/chromium/chrome/browser/resources/chromeos/first_run/app/greeting_image_disabled.html
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/chromium/chrome/browser/resources/chromeos/first_run/app/greeting_image_enabled.html b/chromium/chrome/browser/resources/chromeos/first_run/app/greeting_image_enabled.html
deleted file mode 100644
index 28ae197e27d..00000000000
--- a/chromium/chrome/browser/resources/chromeos/first_run/app/greeting_image_enabled.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<div style="background-image: url(chrome://theme/IDR_FIRST_RUN_GREETING);
- display: inline-block;
- height: 235px;
- width: 662px;" class="greeting-image">
-</div>
diff --git a/chromium/chrome/browser/resources/chromeos/first_run/app/icon/128.png b/chromium/chrome/browser/resources/chromeos/first_run/app/icon/128.png
deleted file mode 100644
index a3006d82c96..00000000000
--- a/chromium/chrome/browser/resources/chromeos/first_run/app/icon/128.png
+++ /dev/null
Binary files differ
diff --git a/chromium/chrome/browser/resources/chromeos/first_run/app/icon/16.png b/chromium/chrome/browser/resources/chromeos/first_run/app/icon/16.png
deleted file mode 100644
index 8d9df98773a..00000000000
--- a/chromium/chrome/browser/resources/chromeos/first_run/app/icon/16.png
+++ /dev/null
Binary files differ
diff --git a/chromium/chrome/browser/resources/chromeos/first_run/app/icon/256.png b/chromium/chrome/browser/resources/chromeos/first_run/app/icon/256.png
deleted file mode 100644
index 3c2e64e9c7a..00000000000
--- a/chromium/chrome/browser/resources/chromeos/first_run/app/icon/256.png
+++ /dev/null
Binary files differ
diff --git a/chromium/chrome/browser/resources/chromeos/first_run/app/icon/32.png b/chromium/chrome/browser/resources/chromeos/first_run/app/icon/32.png
deleted file mode 100644
index ff6cf2aae5e..00000000000
--- a/chromium/chrome/browser/resources/chromeos/first_run/app/icon/32.png
+++ /dev/null
Binary files differ
diff --git a/chromium/chrome/browser/resources/chromeos/first_run/app/icon/48.png b/chromium/chrome/browser/resources/chromeos/first_run/app/icon/48.png
deleted file mode 100644
index 7efbb11c7c3..00000000000
--- a/chromium/chrome/browser/resources/chromeos/first_run/app/icon/48.png
+++ /dev/null
Binary files differ
diff --git a/chromium/chrome/browser/resources/chromeos/first_run/app/icon/64.png b/chromium/chrome/browser/resources/chromeos/first_run/app/icon/64.png
deleted file mode 100644
index b36dd294c38..00000000000
--- a/chromium/chrome/browser/resources/chromeos/first_run/app/icon/64.png
+++ /dev/null
Binary files differ
diff --git a/chromium/chrome/browser/resources/chromeos/first_run/app/icon/96.png b/chromium/chrome/browser/resources/chromeos/first_run/app/icon/96.png
deleted file mode 100644
index 14f1ea1156a..00000000000
--- a/chromium/chrome/browser/resources/chromeos/first_run/app/icon/96.png
+++ /dev/null
Binary files differ
diff --git a/chromium/chrome/browser/resources/chromeos/first_run/app/main.html b/chromium/chrome/browser/resources/chromeos/first_run/app/main.html
deleted file mode 100644
index 32e52a3c0bc..00000000000
--- a/chromium/chrome/browser/resources/chromeos/first_run/app/main.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<!doctype html>
-<html i18n-values="dir:textdirection;.style.fontFamily:fontfamily;lang:language">
- <head>
- <meta charset=utf-8>
- <title></title>
- <link rel="stylesheet" href="chrome://resources/css/text_defaults.css">
- <link rel="stylesheet" href="chrome://resources/css/widgets.css">
- <link rel="stylesheet" href="chrome://resources/css/apps/common.css">
- <link rel="stylesheet" href="chrome://resources/css/apps/topbutton_bar.css">
- <link rel="stylesheet" href="../step.css">
- <link rel="stylesheet" href="../preload.css">
- <link rel="stylesheet" href="style.css">
- <script src="chrome://resources/js/load_time_data.js"></script>
- <script src="chrome://resources/js/util.js"></script>
- <script src="chrome://resources/js/i18n_template_no_process.js"></script>
- <script src="main.js"></script>
- </head>
- <body>
- <div id="greeting" class="step dialog">
- <div class="window-header">
- <div class="topbutton-bar">
- <div class="topbutton-wrapper">
- <button class="custom-appearance close-button"
- i18n-values="aria-label:closeButton" tabindex="1">
- </button>
- </div>
- </div>
- </div>
- <h1 i18n-content="greetingHeader"></h1>
- <p>
- <span i18n-content="greetingText1"></span><br>
- <span i18n-content="greetingText2"></span>
- </p>
- <div class="controls">
- <button i18n-content="greetingButton"
- class="next-button custom-appearance blue-button" tabindex="0">
- </button>
- </div>
- <include src="greeting_image_[GREETING_IMAGE].html">
- </div>
- </body>
-</html>
diff --git a/chromium/chrome/browser/resources/chromeos/first_run/app/main.js b/chromium/chrome/browser/resources/chromeos/first_run/app/main.js
deleted file mode 100644
index e1afc5b29d0..00000000000
--- a/chromium/chrome/browser/resources/chromeos/first_run/app/main.js
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2013 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.
-
-function init() {
- var content = $('greeting');
- chrome.firstRunPrivate.getLocalizedStrings(function(strings) {
- loadTimeData.data = strings;
- i18nTemplate.process(document, loadTimeData);
- // Resizing and centering app's window.
- var bounds = {};
- bounds.width = content.offsetWidth;
- bounds.height = content.offsetHeight;
- bounds.left = Math.round(0.5 * (window.screen.availWidth - bounds.width));
- bounds.top = Math.round(0.5 * (window.screen.availHeight - bounds.height));
- appWindow.setBounds(bounds);
- appWindow.show();
- });
- var closeButton = content.getElementsByClassName('close-button')[0];
- // Make close unfocusable by mouse.
- closeButton.addEventListener('mousedown', function(e) {
- e.preventDefault();
- });
- closeButton.addEventListener('click', function(e) {
- appWindow.close();
- e.stopPropagation();
- });
- var tutorialButton = content.getElementsByClassName('next-button')[0];
- tutorialButton.addEventListener('click', function(e) {
- chrome.firstRunPrivate.launchTutorial();
- appWindow.close();
- e.stopPropagation();
- });
-}
-
-document.addEventListener('DOMContentLoaded', init);
diff --git a/chromium/chrome/browser/resources/chromeos/first_run/app/style.css b/chromium/chrome/browser/resources/chromeos/first_run/app/style.css
deleted file mode 100644
index 399b29ada46..00000000000
--- a/chromium/chrome/browser/resources/chromeos/first_run/app/style.css
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * Copyright 2013 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.
- */
-
-body {
- margin: 0;
- padding: 0;
-}
-
-.step.dialog {
- align-items: center;
- display: flex;
- flex-direction: column;
- padding: 40px;
- text-align: center;
- width: 720px;
-}
-
-.step.dialog h1 {
- font-size: 30px;
- margin-bottom: 16px;
- margin-top: 0;
-}
-
-.step.dialog p {
- font-size: 15px;
- margin-bottom: 0;
- margin-top: 0;
-}
-
-.step.dialog .controls {
- margin-bottom: 0;
- margin-top: 40px;
-}
-
-.step.dialog .controls button {
- font-size: 12px;
- min-width: 0;
- padding: 0 35px;
- text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
-}
-
-.step.dialog .window-header {
- -webkit-app-region: drag;
- display: block;
- left: 0;
- position: absolute;
- right: 0;
- top: 0;
-}
-
-.step.dialog .topbutton-bar {
- display: block;
- margin-top: 10px;
-}
-
-.step.dialog .topbutton-wrapper {
- -webkit-padding-end: 10px;
- display: flex;
- justify-content: flex-end;
-}
-
-.step.dialog .topbutton-bar button {
- -webkit-app-region: no-drag;
- -webkit-margin-end: 0;
- display: inline;
-}
-
-.step.dialog .greeting-image {
- margin-bottom: 49px;
- margin-top: 64px;
-}
diff --git a/chromium/chrome/browser/resources/chromeos/first_run/app_list_step.html b/chromium/chrome/browser/resources/chromeos/first_run/app_list_step.html
deleted file mode 100644
index bdc51ce99fc..00000000000
--- a/chromium/chrome/browser/resources/chromeos/first_run/app_list_step.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<div id="app-list" class="step bubble transparent hidden">
- <h1 i18n-content="appListHeader"></h1>
- <p>
- <span i18n-content="appListText1"></span><br>
- <span i18n-content="appListText2"></span>
- </p>
- <div class="controls">
- <button i18n-content="nextButton"
- class="next-button custom-appearance blue-button"></button>
- </div>
-</div>
diff --git a/chromium/chrome/browser/resources/chromeos/first_run/background.svg b/chromium/chrome/browser/resources/chromeos/first_run/background.svg
deleted file mode 100644
index befcbb35a91..00000000000
--- a/chromium/chrome/browser/resources/chromeos/first_run/background.svg
+++ /dev/null
@@ -1,14 +0,0 @@
-<div id="background-container" class="transparent">
- <svg id="background" xmlns="http://www.w3.org/2000/svg"
- xmlns:xlink="http://www.w3.org/1999/xlink">
- <defs>
- <rect id="rectangular-hole-pattern" class="hole transparent"/>
- <circle id="round-hole-pattern" class="hole transparent"/>
- <mask id="mask" maskUnits="objectBoundingBox"
- maskContentUnits="userSpaceOnUse">
- <rect width="100%" height="100%" fill="white"/>
- </mask>
- </defs>
- <rect class="fill" width="100%" height="100%" mask="url(#mask)"/>
- </svg>
-</div>
diff --git a/chromium/chrome/browser/resources/chromeos/first_run/bubble.css b/chromium/chrome/browser/resources/chromeos/first_run/bubble.css
deleted file mode 100644
index 7c11c0ebac9..00000000000
--- a/chromium/chrome/browser/resources/chromeos/first_run/bubble.css
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * Copyright 2013 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.
- */
-
-.bubble .arrow {
- border: solid transparent;
- border-width: 6px;
- content: ' ';
- height: 0;
- pointer-events: none;
- position: absolute;
- width: 0;
-}
-
-.bubble .arrow.points-up {
- border-bottom-color: white;
- bottom: 100%;
-}
-
-.bubble .arrow.points-right {
- border-left-color: white;
- left: 100%;
-}
-
-.bubble .arrow.points-down {
- border-top-color: white;
- top: 100%;
-}
-
-.bubble .arrow.points-left {
- border-right-color: white;
- right: 100%;
-}
-
-.bubble .arrow.top {
- top: 12px;
-}
-
-.bubble .arrow.right {
- right: 12px;
-}
-
-.bubble .arrow.bottom {
- bottom: 12px;
-}
-
-.bubble .arrow.left {
- left: 12px;
-}
diff --git a/chromium/chrome/browser/resources/chromeos/first_run/first_run.css b/chromium/chrome/browser/resources/chromeos/first_run/first_run.css
deleted file mode 100644
index e5d5d0bd9b8..00000000000
--- a/chromium/chrome/browser/resources/chromeos/first_run/first_run.css
+++ /dev/null
@@ -1,76 +0,0 @@
-/**
- * Copyright 2013 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.
- */
-
-[hidden] {
- display: none !important;
-}
-
-html,
-body {
- margin: 0;
- padding: 0;
-}
-
-body {
- background-color: rgba(0, 0, 0, 0);
- cursor: default;
- height: 100%;
- overflow: hidden;
- position: fixed;
- width: 100%;
-}
-
-.transparent {
- opacity: 0;
-}
-
-.show-animated,
-.hide-animated {
- transition-property: opacity;
-}
-
-.show-animated {
- transition-function: ease-in;
-}
-
-.hide-animated {
- transition-function: ease-out;
-}
-
-#background-container {
- height: 100%;
- left: 0;
- position: absolute;
- top: 0;
- width: 100%;
- z-index: -1;
-}
-
-#background {
- height: 100%;
- position: absolute;
- width: 100%;
-}
-
-#background .fill {
- fill: rgba(0, 0, 0, 0.5);
-}
-
-#steps {
- align-items: center;
- display: flex;
- flex-flow: row;
- height: 100%;
- justify-content: center;
- width: 100%;
-}
-
-#help #completion-image {
- background-image: url(chrome://theme/IDR_FIRST_RUN_COMPLETION);
- display: inline-block;
- height: 153px;
- width: 400px;
-}
diff --git a/chromium/chrome/browser/resources/chromeos/first_run/first_run.html b/chromium/chrome/browser/resources/chromeos/first_run/first_run.html
deleted file mode 100644
index 29fe952b2bf..00000000000
--- a/chromium/chrome/browser/resources/chromeos/first_run/first_run.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!doctype html>
-<html i18n-values="dir:textdirection;shelf:shelfAlignment;.style.fontFamily:fontfamily;">
- <head>
- <meta charset=utf-8>
- <title></title>
- <link rel="stylesheet" href="chrome://resources/css/text_defaults.css">
- <link rel="stylesheet" href="chrome://resources/css/widgets.css">
- <link rel="stylesheet" href="chrome://resources/css/apps/common.css">
- <link rel="stylesheet" href="bubble.css">
- <link rel="stylesheet" href="first_run.css">
- <link rel="stylesheet" href="preload.css">
- <link rel="stylesheet" href="step.css">
- <link rel="stylesheet" href="step_bubble.css">
- <script src="chrome://resources/js/cr.js"></script>
- <script src="chrome://resources/js/cr/ui.js"></script>
- <script src="chrome://resources/js/load_time_data.js"></script>
- <script src="chrome://resources/js/util.js"></script>
- <script src="chrome://first-run/first_run.js"></script>
- <script src="chrome://first-run/strings.js"></script>
- </head>
- <body>
- <include src="background.svg">
- <div id="steps">
- <include src="app_list_step.html">
- <include src="tray_step.html">
- <include src="help_step.html">
- </div>
- <script src="chrome://resources/js/i18n_template.js"></script>
- </body>
-</html>
-
diff --git a/chromium/chrome/browser/resources/chromeos/first_run/first_run.js b/chromium/chrome/browser/resources/chromeos/first_run/first_run.js
deleted file mode 100644
index 10ba74bb3e5..00000000000
--- a/chromium/chrome/browser/resources/chromeos/first_run/first_run.js
+++ /dev/null
@@ -1,275 +0,0 @@
-// Copyright 2013 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 First run UI.
- */
-
-<include src="step.js">
-
-// Transitions durations.
-/** @const */ var DEFAULT_TRANSITION_DURATION_MS = 400;
-/** @const */ var BG_TRANSITION_DURATION_MS = 800;
-
-/**
- * Changes visibility of element with animated transition.
- * @param {Element} element Element which visibility should be changed.
- * @param {boolean} visible Whether element should be visible after transition.
- * @param {number=} opt_transitionDuration Time length of transition in
- * milliseconds. Default value is DEFAULT_TRANSITION_DURATION_MS.
- * @param {function()=} opt_onFinished Called after transition has finished.
- */
-function changeVisibility(
- element, visible, opt_transitionDuration, opt_onFinished) {
- var classes = element.classList;
- // If target visibility is the same as current element visibility.
- if (classes.contains('transparent') === !visible) {
- if (opt_onFinished)
- opt_onFinished();
- return;
- }
- var transitionDuration = (opt_transitionDuration === undefined) ?
- cr.FirstRun.getDefaultTransitionDuration() : opt_transitionDuration;
- var style = element.style;
- var oldDurationValue = style.getPropertyValue('transition-duration');
- style.setProperty('transition-duration', transitionDuration + 'ms');
- var transition = visible ? 'show-animated' : 'hide-animated';
- classes.add(transition);
- classes.toggle('transparent');
- element.addEventListener('webkitTransitionEnd', function f() {
- element.removeEventListener('webkitTransitionEnd', f);
- classes.remove(transition);
- if (oldDurationValue)
- style.setProperty('transition-duration', oldDurationValue);
- else
- style.removeProperty('transition-duration');
- if (opt_onFinished)
- opt_onFinished();
- });
- ensureTransitionEndEvent(element, transitionDuration);
-}
-
-cr.define('cr.FirstRun', function() {
- return {
- // Whether animated transitions are enabled.
- transitionsEnabled_: false,
-
- // SVG element representing UI background.
- background_: null,
-
- // Container for background.
- backgroundContainer_: null,
-
- // Mask element describing transparent "holes" in background.
- mask_: null,
-
- // Pattern used for creating rectangular holes.
- rectangularHolePattern_: null,
-
- // Pattern used for creating round holes.
- roundHolePattern_: null,
-
- // Dictionary keeping all available tutorial steps by their names.
- steps_: {},
-
- // Element representing step currently shown for user.
- currentStep_: null,
-
- /**
- * Initializes internal structures and preparing steps.
- */
- initialize: function() {
- disableTextSelectAndDrag();
- this.transitionsEnabled_ = loadTimeData.getBoolean('transitionsEnabled');
- this.background_ = $('background');
- this.backgroundContainer_ = $('background-container');
- this.mask_ = $('mask');
- this.rectangularHolePattern_ = $('rectangular-hole-pattern');
- this.rectangularHolePattern_.removeAttribute('id');
- this.roundHolePattern_ = $('round-hole-pattern');
- this.roundHolePattern_.removeAttribute('id');
- var stepElements = document.getElementsByClassName('step');
- for (var i = 0; i < stepElements.length; ++i) {
- var step = stepElements[i];
- cr.FirstRun.DecorateStep(step);
- this.steps_[step.getName()] = step;
- }
- this.setBackgroundVisible(true, function() {
- chrome.send('initialized');
- });
- },
-
- /**
- * Hides all elements and background.
- */
- finalize: function() {
- // At first we hide holes (job 1) and current step (job 2) simultaneously,
- // then background.
- var jobsLeft = 2;
- var onJobDone = function() {
- --jobsLeft;
- if (jobsLeft)
- return;
- this.setBackgroundVisible(false, function() {
- chrome.send('finalized');
- });
- }.bind(this);
- this.doHideCurrentStep_(function(name) {
- if (name)
- chrome.send('stepHidden', [name]);
- onJobDone();
- });
- this.removeHoles(onJobDone);
- },
-
- /**
- * Adds transparent rectangular hole to background.
- * @param {number} x X coordinate of top-left corner of hole.
- * @param {number} y Y coordinate of top-left corner of hole.
- * @param {number} widht Width of hole.
- * @param {number} height Height of hole.
- */
- addRectangularHole: function(x, y, width, height) {
- var hole = this.rectangularHolePattern_.cloneNode();
- hole.setAttribute('x', x);
- hole.setAttribute('y', y);
- hole.setAttribute('width', width);
- hole.setAttribute('height', height);
- this.mask_.appendChild(hole);
- setTimeout(function() {
- changeVisibility(hole, true);
- }, 0);
- },
-
- /**
- * Adds transparent round hole to background.
- * @param {number} x X coordinate of circle center.
- * @param {number} y Y coordinate of circle center.
- * @param {number} radius Radius of circle.
- */
- addRoundHole: function(x, y, radius) {
- var hole = this.roundHolePattern_.cloneNode();
- hole.setAttribute('cx', x);
- hole.setAttribute('cy', y);
- hole.setAttribute('r', radius);
- this.mask_.appendChild(hole);
- setTimeout(function() {
- changeVisibility(hole, true);
- }, 0);
- },
-
- /**
- * Removes all holes previously added by |addHole|.
- * @param {function=} opt_onHolesRemoved Called after all holes have been
- * hidden.
- */
- removeHoles: function(opt_onHolesRemoved) {
- var mask = this.mask_;
- var holes = Array.prototype.slice.call(
- mask.getElementsByClassName('hole'));
- var holesLeft = holes.length;
- if (!holesLeft) {
- if (opt_onHolesRemoved)
- opt_onHolesRemoved();
- return;
- }
- holes.forEach(function(hole) {
- changeVisibility(hole, false, this.getDefaultTransitionDuration(),
- function() {
- mask.removeChild(hole);
- --holesLeft;
- if (!holesLeft && opt_onHolesRemoved)
- opt_onHolesRemoved();
- });
- }.bind(this));
- },
-
- /**
- * Hides currently active step and notifies chrome after step has been
- * hidden.
- */
- hideCurrentStep: function() {
- assert(this.currentStep_);
- this.doHideCurrentStep_(function(name) {
- chrome.send('stepHidden', [name]);
- });
- },
-
- /**
- * Hides currently active step.
- * @param {function(string)=} opt_onStepHidden Called after step has been
- * hidden.
- */
- doHideCurrentStep_: function(opt_onStepHidden) {
- if (!this.currentStep_) {
- if (opt_onStepHidden)
- opt_onStepHidden();
- return;
- }
- var name = this.currentStep_.getName();
- this.currentStep_.hide(true, function() {
- this.currentStep_ = null;
- if (opt_onStepHidden)
- opt_onStepHidden(name);
- }.bind(this));
- },
-
- /**
- * Shows step with given name in given position.
- * @param {string} name Name of step.
- * @param {object} position Optional parameter with optional fields |top|,
- * |right|, |bottom|, |left| used for step positioning.
- * @param {Array} pointWithOffset Optional parameter for positioning
- * bubble. Contains [x, y, offset], where (x, y) - point to which bubble
- * points, offset - distance between arrow and point.
- */
- showStep: function(name, position, pointWithOffset) {
- assert(!this.currentStep_);
- if (!this.steps_.hasOwnProperty(name))
- throw Error('Step "' + name + '" not found.');
- var step = this.steps_[name];
- if (position)
- step.setPosition(position);
- if (pointWithOffset)
- step.setPointsTo(pointWithOffset.slice(0, 2), pointWithOffset[2]);
- step.show(true, function(step) {
- step.focusDefaultControl();
- this.currentStep_ = step;
- chrome.send('stepShown', [name]);
- }.bind(this));
- },
-
- /**
- * Sets visibility of the background.
- * @param {boolean} visibility Whether background should be visible.
- * @param {function()=} opt_onCompletion Called after visibility has
- * changed.
- */
- setBackgroundVisible: function(visible, opt_onCompletion) {
- changeVisibility(this.backgroundContainer_, visible,
- this.getBackgroundTransitionDuration(), opt_onCompletion);
- },
-
- /**
- * Returns default duration of animated transitions, in ms.
- */
- getDefaultTransitionDuration: function() {
- return this.transitionsEnabled_ ? DEFAULT_TRANSITION_DURATION_MS : 0;
- },
-
- /**
- * Returns duration of transitions of background shield, in ms.
- */
- getBackgroundTransitionDuration: function() {
- return this.transitionsEnabled_ ? BG_TRANSITION_DURATION_MS : 0;
- }
- };
-});
-
-/**
- * Initializes UI.
- */
-window.onload = function() {
- cr.FirstRun.initialize();
-};
diff --git a/chromium/chrome/browser/resources/chromeos/first_run/help_step.html b/chromium/chrome/browser/resources/chromeos/first_run/help_step.html
deleted file mode 100644
index 0a9c513079e..00000000000
--- a/chromium/chrome/browser/resources/chromeos/first_run/help_step.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<div id="help" class="step bubble transparent hidden">
- <div id="completion-image"></div>
- <h1 i18n-content="helpHeader"></h1>
- <p i18n-content="helpText1"></p>
- <p i18n-content="helpText2"></p>
- <div class="controls">
- <button i18n-content="helpKeepExploringButton"
- class="help-button custom-appearance blue-button"></button>
- <button i18n-content="helpFinishButton"
- class="next-button custom-appearance white-button"></button>
- </div>
-</div>
diff --git a/chromium/chrome/browser/resources/chromeos/first_run/preload.css b/chromium/chrome/browser/resources/chromeos/first_run/preload.css
deleted file mode 100644
index 03baa02837d..00000000000
--- a/chromium/chrome/browser/resources/chromeos/first_run/preload.css
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * Copyright 2014 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.
- */
-
-/**
- * Preloads images. Without preloading, background image starts loading in
- * the moment when CSS property is applied. Image loading has visible delay and
- * looks like defect.
- */
-
-@media all and (-webkit-max-device-pixel-ratio: 1.5) {
- body::after {
- content:
- url(chrome://resources/images/apps/button.png)
- url(chrome://resources/images/apps/button_hover.png)
- url(chrome://resources/images/apps/button_pressed.png)
- url(chrome://resources/images/apps/button_focused.png)
- url(chrome://resources/images/apps/button_focused_hover.png)
- url(chrome://resources/images/apps/button_focused_pressed.png)
- url(chrome://resources/images/apps/button_inactive.png)
- url(chrome://resources/images/apps/blue_button.png)
- url(chrome://resources/images/apps/blue_button_hover.png)
- url(chrome://resources/images/apps/blue_button_pressed.png)
- url(chrome://resources/images/apps/blue_button_focused.png)
- url(chrome://resources/images/apps/blue_button_focused_hover.png)
- url(chrome://resources/images/apps/blue_button_focused_pressed.png)
- url(chrome://resources/images/apps/blue_button_inactive.png);
- display: none;
- }
-}
-
-@media all and (-webkit-min-device-pixel-ratio: 1.5) {
- body::after {
- content:
- url(chrome://resources/images/2x/apps/button.png)
- url(chrome://resources/images/2x/apps/button_hover.png)
- url(chrome://resources/images/2x/apps/button_pressed.png)
- url(chrome://resources/images/2x/apps/button_focused.png)
- url(chrome://resources/images/2x/apps/button_focused_hover.png)
- url(chrome://resources/images/2x/apps/button_focused_pressed.png)
- url(chrome://resources/images/2x/apps/button_inactive.png)
- url(chrome://resources/images/2x/apps/blue_button.png)
- url(chrome://resources/images/2x/apps/blue_button_hover.png)
- url(chrome://resources/images/2x/apps/blue_button_pressed.png)
- url(chrome://resources/images/2x/apps/blue_button_focused.png)
- url(chrome://resources/images/2x/apps/blue_button_focused_hover.png)
- url(chrome://resources/images/2x/apps/blue_button_focused_pressed.png)
- url(chrome://resources/images/2x/apps/blue_button_inactive.png);
- display: none;
- }
-}
diff --git a/chromium/chrome/browser/resources/chromeos/first_run/step.css b/chromium/chrome/browser/resources/chromeos/first_run/step.css
deleted file mode 100644
index 52e424eeb3e..00000000000
--- a/chromium/chrome/browser/resources/chromeos/first_run/step.css
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * Copyright 2013 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.
- */
-
-.step {
- background: white;
- color: #8c8c8c;
- padding: 0;
-}
-
-.step h1 {
- color: #333;
- font-weight: normal;
-}
-
-.step p {
- line-height: 1.5;
-}
-
-.step button.blue-button {
- color: white;
-}
-
-.step button.white-button {
- color: black;
-}
-
-.step .controls button {
- margin: 0 3px;
-}
-
-.step .controls button:first-of-type {
- -webkit-margin-start: 0;
-}
-
-.step .controls button:last-of-type {
- -webkit-margin-end: 0;
-}
diff --git a/chromium/chrome/browser/resources/chromeos/first_run/step.js b/chromium/chrome/browser/resources/chromeos/first_run/step.js
deleted file mode 100644
index 213ea27c02e..00000000000
--- a/chromium/chrome/browser/resources/chromeos/first_run/step.js
+++ /dev/null
@@ -1,300 +0,0 @@
-// Copyright 2013 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.
-
-/**
- * Prototype for first-run tutorial steps.
- */
-
-cr.define('cr.FirstRun', function() {
- var Step = cr.ui.define('div');
-
- Step.prototype = {
- __proto__: HTMLDivElement.prototype,
-
- // Name of step.
- name_: null,
-
- // Button leading to next tutorial step.
- nextButton_: null,
-
- // Default control for this step.
- defaultControl_: null,
-
- decorate: function() {
- this.name_ = this.getAttribute('id');
- var controlsContainer = this.getElementsByClassName('controls')[0];
- if (!controlsContainer)
- throw Error('Controls not found.');
- this.nextButton_ =
- controlsContainer.getElementsByClassName('next-button')[0];
- if (!this.nextButton_)
- throw Error('Next button not found.');
- this.nextButton_.addEventListener('click', (function(e) {
- chrome.send('nextButtonClicked', [this.getName()]);
- e.stopPropagation();
- }).bind(this));
- this.defaultControl_ = controlsContainer.children[0];
- },
-
- /**
- * Returns name of the string.
- */
- getName: function() {
- return this.name_;
- },
-
- /**
- * Hides the step.
- * @param {boolean} animated Whether transition should be animated.
- * @param {function()=} opt_onHidden Called after step has been hidden.
- */
- hide: function(animated, opt_onHidden) {
- var transitionDuration =
- animated ? cr.FirstRun.getDefaultTransitionDuration() : 0;
- changeVisibility(this,
- false,
- transitionDuration,
- function() {
- this.classList.add('hidden');
- if (opt_onHidden)
- opt_onHidden();
- }.bind(this));
- },
-
- /**
- * Shows the step.
- * @param {boolean} animated Whether transition should be animated.
- * @param {function(Step)=} opt_onShown Called after step has been shown.
- */
- show: function(animated, opt_onShown) {
- var transitionDuration =
- animated ? cr.FirstRun.getDefaultTransitionDuration() : 0;
- this.classList.remove('hidden');
- changeVisibility(this,
- true,
- transitionDuration,
- function() {
- if (opt_onShown)
- opt_onShown(this);
- }.bind(this));
- },
-
- /**
- * Sets position of the step.
- * @param {object} position Parameter with optional fields |top|,
- * |right|, |bottom|, |left| holding corresponding offsets.
- */
- setPosition: function(position) {
- var style = this.style;
- ['top', 'right', 'bottom', 'left'].forEach(function(property) {
- if (position.hasOwnProperty(property))
- style.setProperty(property, position[property] + 'px');
- });
- },
-
- /**
- * Makes default control focused. Default control is a first control in
- * current implementation.
- */
- focusDefaultControl: function() {
- this.defaultControl_.focus();
- },
- };
-
- var Bubble = cr.ui.define('div');
-
- // List of rules declaring bubble's arrow position depending on text direction
- // and shelf alignment. Every rule has required field |position| with list
- // of classes that should be applied to arrow element if this rule choosen.
- // The rule is suitable if its |shelf| and |dir| fields are correspond
- // to current shelf alignment and text direction. Missing fields behaves like
- // '*' wildcard. The last suitable rule in list is choosen for arrow style.
- var ARROW_POSITION = {
- 'app-list': [
- {
- position: ['points-down', 'left']
- },
- {
- dir: 'rtl',
- position: ['points-down', 'right']
- },
- {
- shelf: 'left',
- position: ['points-left', 'top']
- },
- {
- shelf: 'right',
- position: ['points-right', 'top']
- }
- ],
- 'tray': [
- {
- position: ['points-right', 'top']
- },
- {
- dir: 'rtl',
- shelf: 'bottom',
- position: ['points-left', 'top']
- },
- {
- shelf: 'left',
- position: ['points-left', 'top']
- }
- ],
- 'help': [
- {
- position: ['points-right', 'bottom']
- },
- {
- dir: 'rtl',
- shelf: 'bottom',
- position: ['points-left', 'bottom']
- },
- {
- shelf: 'left',
- position: ['points-left', 'bottom']
- }
- ]
- };
-
- var DISTANCE_TO_POINTEE = 10;
- var MINIMAL_SCREEN_OFFSET = 10;
- var ARROW_LENGTH = 6; // Keep synced with .arrow border-width.
-
- Bubble.prototype = {
- __proto__: Step.prototype,
-
- // Element displaying arrow.
- arrow_: null,
-
- // Unit vector directed along the bubble arrow.
- direction_: null,
-
- /**
- * In addition to base class 'decorate' this method creates arrow and
- * sets some properties related to arrow.
- */
- decorate: function() {
- Step.prototype.decorate.call(this);
- this.arrow_ = document.createElement('div');
- this.arrow_.classList.add('arrow');
- this.appendChild(this.arrow_);
- var inputDirection = document.documentElement.getAttribute('dir');
- var shelfAlignment = document.documentElement.getAttribute('shelf');
- var isSuitable = function(rule) {
- var inputDirectionMatch = !rule.hasOwnProperty('dir') ||
- rule.dir === inputDirection;
- var shelfAlignmentMatch = !rule.hasOwnProperty('shelf') ||
- rule.shelf === shelfAlignment;
- return inputDirectionMatch && shelfAlignmentMatch;
- };
- var lastSuitableRule = null;
- var rules = ARROW_POSITION[this.getName()];
- rules.forEach(function(rule) {
- if (isSuitable(rule))
- lastSuitableRule = rule;
- });
- assert(lastSuitableRule);
- lastSuitableRule.position.forEach(function(cls) {
- this.arrow_.classList.add(cls);
- }.bind(this));
- var list = this.arrow_.classList;
- if (list.contains('points-up'))
- this.direction_ = [0, -1];
- else if (list.contains('points-right'))
- this.direction_ = [1, 0];
- else if (list.contains('points-down'))
- this.direction_ = [0, 1];
- else // list.contains('points-left')
- this.direction_ = [-1, 0];
- },
-
- /**
- * Sets position of bubble in such a maner that bubble's arrow points to
- * given point.
- * @param {Array} point Bubble arrow should point to this point after
- * positioning. |point| has format [x, y].
- * @param {offset} number Additional offset from |point|.
- */
- setPointsTo: function(point, offset) {
- var shouldShowBefore = this.hidden;
- // "Showing" bubble in order to make offset* methods work.
- if (shouldShowBefore) {
- this.style.setProperty('opacity', '0');
- this.show(false);
- }
- var arrow = [this.arrow_.offsetLeft + this.arrow_.offsetWidth / 2,
- this.arrow_.offsetTop + this.arrow_.offsetHeight / 2];
- var totalOffset = DISTANCE_TO_POINTEE + offset;
- var left = point[0] - totalOffset * this.direction_[0] - arrow[0];
- var top = point[1] - totalOffset * this.direction_[1] - arrow[1];
- // Force bubble to be inside screen.
- if (this.arrow_.classList.contains('points-up') ||
- this.arrow_.classList.contains('points-down')) {
- left = Math.max(left, MINIMAL_SCREEN_OFFSET);
- left = Math.min(left, document.body.offsetWidth - this.offsetWidth -
- MINIMAL_SCREEN_OFFSET);
- }
- if (this.arrow_.classList.contains('points-left') ||
- this.arrow_.classList.contains('points-right')) {
- top = Math.max(top, MINIMAL_SCREEN_OFFSET);
- top = Math.min(top, document.body.offsetHeight - this.offsetHeight -
- MINIMAL_SCREEN_OFFSET);
- }
- this.style.setProperty('left', left + 'px');
- this.style.setProperty('top', top + 'px');
- if (shouldShowBefore) {
- this.hide(false);
- this.style.removeProperty('opacity');
- }
- },
-
- /**
- * Sets position of bubble. Overrides Step.setPosition to adjust offsets
- * in case if its direction is the same as arrow's direction.
- * @param {object} position Parameter with optional fields |top|,
- * |right|, |bottom|, |left| holding corresponding offsets.
- */
- setPosition: function(position) {
- var arrow = this.arrow_;
- // Increasing offset if it's from side where bubble points to.
- [['top', 'points-up'],
- ['right', 'points-right'],
- ['bottom', 'points-down'],
- ['left', 'points-left']].forEach(function(mapping) {
- if (position.hasOwnProperty(mapping[0]) &&
- arrow.classList.contains(mapping[1])) {
- position[mapping[0]] += ARROW_LENGTH + DISTANCE_TO_POINTEE;
- }
- });
- Step.prototype.setPosition.call(this, position);
- },
- };
-
- var HelpStep = cr.ui.define('div');
-
- HelpStep.prototype = {
- __proto__: Bubble.prototype,
-
- decorate: function() {
- Bubble.prototype.decorate.call(this);
- var helpButton = this.getElementsByClassName('help-button')[0];
- helpButton.addEventListener('click', function(e) {
- chrome.send('helpButtonClicked');
- e.stopPropagation();
- });
- },
- };
-
- var DecorateStep = function(el) {
- if (el.id == 'help')
- HelpStep.decorate(el);
- else if (el.classList.contains('bubble'))
- Bubble.decorate(el);
- else
- Step.decorate(el);
- };
-
- return {DecorateStep: DecorateStep};
-});
diff --git a/chromium/chrome/browser/resources/chromeos/first_run/step_bubble.css b/chromium/chrome/browser/resources/chromeos/first_run/step_bubble.css
deleted file mode 100644
index 202a2de24ac..00000000000
--- a/chromium/chrome/browser/resources/chromeos/first_run/step_bubble.css
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * Copyright 2013 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.
- */
-
-.step.bubble {
- border: 1px solid;
- border-radius: 3px;
- box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
- display: inline-block;
- position: absolute;
- width: 400px;
-}
-
-.step.bubble h1 {
- font-size: 18px;
- margin-bottom: 20px;
- margin-left: 20px;
- margin-right: 20px;
- margin-top: 20px;
-}
-
-.step.bubble p {
- font-size: 14px;
- margin-left: 20px;
- margin-right: 20px;
-}
-
-.step.bubble p + p {
- margin-top: 30px;
-}
-
-.step.bubble .controls {
- margin-bottom: 18px;
- margin-left: 18px;
- margin-right: 18px;
- margin-top: 18px;
- text-align: end;
-}
-
-.step.bubble .controls button {
- font-size: 12px;
- min-width: 0;
- padding: 0 15px;
- text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
-}
-
-.step.bubble.hidden {
- visibility: hidden;
-}
diff --git a/chromium/chrome/browser/resources/chromeos/first_run/tray_step.html b/chromium/chrome/browser/resources/chromeos/first_run/tray_step.html
deleted file mode 100644
index 2b7b9e73f3c..00000000000
--- a/chromium/chrome/browser/resources/chromeos/first_run/tray_step.html
+++ /dev/null
@@ -1,8 +0,0 @@
-<div id="tray" class="step bubble transparent hidden">
- <h1 i18n-content="trayHeader"></h1>
- <p i18n-content="trayText"><p>
- <div class="controls">
- <button i18n-content="nextButton"
- class="next-button custom-appearance blue-button"></button>
- </div>
-</div>