Commit e8414881 authored by Scott Chen's avatar Scott Chen Committed by Commit Bot

Nux Onboarding: Add icon for set-default button for win-10

Bug: 874122
Change-Id: Ic25e7cf5b0c2d37af4d9ba2af311f9ce0c12e08b
Reviewed-on: https://chromium-review.googlesource.com/c/1298616
Commit-Queue: Scott Chen <scottchen@chromium.org>
Reviewed-by: default avatarHector Carmona <hcarmona@chromium.org>
Cr-Commit-Position: refs/heads/master@{#603767}
parent 7767728e
......@@ -145,10 +145,12 @@
type="chrome_html" />
<structure name="IDR_NUX_SET_AS_DEFAULT_HTML"
file="set_as_default\nux_set_as_default.html"
type="chrome_html" />
type="chrome_html"
preprocess="true"/>
<structure name="IDR_NUX_SET_AS_DEFAULT_JS"
file="set_as_default\nux_set_as_default.js"
type="chrome_html" />
type="chrome_html"
preprocess="true"/>
<structure name="IDR_NUX_SET_AS_DEFAULT_PROXY_HTML"
file="set_as_default\nux_set_as_default_proxy.html"
type="chrome_html" />
......
......@@ -15,6 +15,7 @@ js_library("nux_set_as_default") {
":nux_set_as_default_proxy",
"../:navigation_behavior",
"../shared:nux_types",
"//ui/webui/resources/js:load_time_data",
"//ui/webui/resources/js:web_ui_listener_behavior",
]
}
......
<link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/cr_elements/icons.html">
<link rel="import" href="chrome://resources/cr_elements/paper_button_style_css.html">
<link rel="import" href="chrome://resources/cr_elements/shared_vars_css.html">
<link rel="import" href="chrome://resources/html/web_ui_listener_behavior.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html">
<link rel="import" href="../navigation_behavior.html">
<link rel="import" href="nux_set_as_default_proxy.html">
<link rel="import" href="../shared/i18n_setup.html">
<link rel="import" href="../shared/step_indicator.html">
<link rel="import" href="nux_set_as_default_proxy.html">
<if expr="is_win">
<link rel="import" href="chrome://resources/cr_elements/icons.html">
<link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.html">
</if>
<dom-module id="nux-set-as-default">
<template>
......@@ -57,6 +61,15 @@
justify-content: space-between;
margin-top: 64px;
}
<if expr="is_win">
iron-icon[icon='cr:open-in-new'] {
height: 20px;
margin-left: 6px;
margin-right: -10px;
width: 20px;
}
</if>
</style>
<div class="container">
<div class="logo"></div>
......@@ -70,6 +83,9 @@
<step-indicator model="[[indicatorModel]]"></step-indicator>
<paper-button class="action-button" on-click="onSetDefaultClick_">
$i18n{setDefaultConfirm}
<if expr="is_win">
<iron-icon icon="cr:open-in-new" hidden="[[!isWin10]]"></iron-icon>
</if>
</paper-button>
</div>
</div>
......
......@@ -13,6 +13,13 @@ Polymer({
properties: {
/** @type {nux.stepIndicatorModel} */
indicatorModel: Object,
// <if expr="is_win">
isWin10: {
type: Boolean,
value: loadTimeData.getBoolean('is_win10'),
},
// </if>
},
/** @override */
......
......@@ -32,6 +32,10 @@
#include "net/base/url_util.h"
#include "ui/base/l10n/l10n_util.h"
#if defined(OS_WIN)
#include "base/win/windows_version.h"
#endif
namespace {
const bool kIsBranded =
#if defined(GOOGLE_CHROME_BUILD)
......@@ -182,6 +186,11 @@ WelcomeUI::WelcomeUI(content::WebUI* web_ui, const GURL& url)
html_source->AddResourcePath("images/set_as_default_illustration_2x.png",
IDR_NUX_SET_AS_DEFAULT_ILLUSTRATION_2X);
#if defined(OS_WIN)
html_source->AddBoolean(
"is_win10", base::win::GetVersion() >= base::win::VERSION_WIN10);
#endif
// Add the shared bookmark handler for onboarding modules.
web_ui->AddMessageHandler(
std::make_unique<nux::BookmarkHandler>(profile->GetPrefs()));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment