Commit 644d8a64 authored by Kuo Jen Wei's avatar Kuo Jen Wei Committed by Commit Bot

[CCA] Remove welcome banner.

Bug: 1006655
Test: Welcome banner won't popup. All other camera feature function
normally.

Change-Id: I7157845a9b9158e7a884a1589e51e8db3fc589ae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1818001
Commit-Queue: Shik Chen <shik@chromium.org>
Auto-Submit: Kuo Jen Wei <inker@chromium.org>
Reviewed-by: default avatarShik Chen <shik@chromium.org>
Cr-Commit-Position: refs/heads/master@{#698847}
parent 319fe372
......@@ -79,8 +79,6 @@ copy("chrome_camera_app_images") {
"src/images/camera_button_timer_on_10s.svg",
"src/images/camera_button_timer_on_3s.svg",
"src/images/camera_focus_aim.svg",
"src/images/camera_intro_banner_close.svg",
"src/images/camera_intro_banner_icon.svg",
"src/images/camera_mode_photo.svg",
"src/images/camera_mode_portrait.svg",
"src/images/camera_mode_square.svg",
......
......@@ -93,8 +93,6 @@ RESOURCES = \
src/images/camera_button_timer_on_10s.svg \
src/images/camera_button_timer_on_3s.svg \
src/images/camera_focus_aim.svg \
src/images/camera_intro_banner_close.svg \
src/images/camera_intro_banner_icon.svg \
src/images/camera_mode_photo.svg \
src/images/camera_mode_portrait.svg \
src/images/camera_mode_square.svg \
......
......@@ -87,7 +87,6 @@
<include name="IDR_CAMERA_CAMERA_BUTTON_TIMER_ON_3S_SVG" file="src/images/camera_button_timer_on_3s.svg" type="BINDATA" />
<include name="IDR_CAMERA_CAMERA_SHUTTER_VIDEO_START_HOVER_SVG" file="src/images/camera_shutter_video_start_hover.svg" type="BINDATA" />
<include name="IDR_CAMERA_SPINNER_SVG" file="src/images/spinner.svg" type="BINDATA" />
<include name="IDR_CAMERA_CAMERA_INTRO_BANNER_ICON_SVG" file="src/images/camera_intro_banner_icon.svg" type="BINDATA" />
<include name="IDR_CAMERA_CAMERA_BUTTON_GRID_OFF_SVG" file="src/images/camera_button_grid_off.svg" type="BINDATA" />
<include name="IDR_CAMERA_CAMERA_BUTTON_MIC_ON_SVG" file="src/images/camera_button_mic_on.svg" type="BINDATA" />
<include name="IDR_CAMERA_BROWSER_BUTTON_DELETE_SVG" file="src/images/browser_button_delete.svg" type="BINDATA" />
......@@ -111,7 +110,6 @@
<include name="IDR_CAMERA_SETTINGS_GRID_TYPE_SVG" file="src/images/settings_grid_type.svg" type="BINDATA" />
<include name="IDR_CAMERA_CAMERA_BUTTON_MIRROR_OFF_SVG" file="src/images/camera_button_mirror_off.svg" type="BINDATA" />
<include name="IDR_CAMERA_BROWSER_BUTTON_EXPORT_SVG" file="src/images/browser_button_export.svg" type="BINDATA" />
<include name="IDR_CAMERA_CAMERA_INTRO_BANNER_CLOSE_SVG" file="src/images/camera_intro_banner_close.svg" type="BINDATA" />
<include name="IDR_CAMERA_CAMERA_SHUTTER_PHOTO_START_SVG" file="src/images/camera_shutter_photo_start.svg" type="BINDATA" />
<include name="IDR_CAMERA_BROWSER_BUTTON_BACK_SVG" file="src/images/browser_button_back.svg" type="BINDATA" />
<include name="IDR_CAMERA_CAMERA_SHUTTER_VIDEO_STOP_SVG" file="src/images/camera_shutter_video_stop.svg" type="BINDATA" />
......
......@@ -332,21 +332,5 @@
"MIGRATE_PICTURES_MSG": {
"message": "Photos and videos taken with the camera will be moved to the Downloads folder. You can access them in Files.\n\nApps with storage permissions will have access to your photos and videos.",
"description": "Message shown before moving all photos and videos stored in the Camera App to the Downloads folder."
},
"BANNER_TITLE": {
"message": "A whole new look",
"description": "Title of banner shown for introducing new camera App UI."
},
"BANNER_MSG": {
"message": "Your camera now supports new modes and your photos and videos will be available under your Downloads folders.",
"description": "Message in the banner shown for introducing new camera App UI."
},
"BANNER_CLOSE_BUTTON": {
"message": "Close",
"description": "Label for close introducing new camera App UI banner button."
},
"BANNER_LEARN_MORE_BUTTON": {
"message": "Learn more",
"description": "Label for learn more about new camera App UI button."
}
}
\ No newline at end of file
......@@ -1019,70 +1019,6 @@ body.ext-fs #browser-export {
}
}
#banner {
background: white;
border-radius: 8px;
bottom: -130px;
display: none;
padding: 26px 29px;
width: 460px;
}
#banner.animate {
animation: emerge 12000ms ease-out;
display: block;
}
@keyframes emerge {
0%,
100% {
bottom: -130;
}
10%,
90% {
bottom: 31px;
}
}
#banner-title {
color: rgb(26, 115, 232);
margin-bottom: 10px;
}
#banner-title-icon {
background-image: url(../images/camera_intro_banner_icon.svg);
display: inline-block;
height: 20px;
margin-right: 10px;
vertical-align: middle;
width: 20px;
}
#banner-title-text {
font: 450 18px 'Google Sans', sans-serif;
vertical-align: middle;
}
#banner-msg {
color: rgb(95, 99, 104);
font: 375 15px/22px 'Roboto';
}
#banner-learn-more {
color: rgb(26, 115, 232);
cursor: pointer;
}
#banner-close {
background-image: url(../images/camera_intro_banner_close.svg);
display: block;
height: 20px;
position: absolute;
right: 15px;
top: 15px;
width: 20px;
}
.menu {
background: rgba(0, 0, 0, 0.75);
display: flex;
......
<svg width="20" height="20" viewBox="10 10 20 20" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><path id="a" d="M16 5.41L14.59 4 10 8.59 5.41 4 4 5.41 8.59 10 4 14.59 5.41 16 10 11.41 14.59 16 16 14.59 11.41 10z"/></defs><g fill="none" fill-rule="evenodd"><path d="M0 0h40v40H0z"/><use fill="#5F6368" xlink:href="#a" transform="translate(10 10)"/></g></svg>
\ No newline at end of file
<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"><path d="M5 6l2-2h5l2 2h3a1 1 0 0 1 1 1v11a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h3zM3 8v9h13V8H3zm14.373-5.373L16 2l1.373-.627L18 0l.627 1.373L20 2l-1.373.627L18 4l-.627-1.373zM9.5 15.5a3 3 0 1 1 0-6 3 3 0 0 1 0 6z" fill="#1A73E8"/></svg>
\ No newline at end of file
......@@ -67,16 +67,6 @@ cca.views.Camera = function(
this.options_ =
new cca.views.camera.Options(infoUpdater, this.restart.bind(this));
/**
* @type {HTMLElement}
*/
this.banner_ = document.querySelector('#banner');
/**
* @type {HTMLButtonElement}
*/
this.bannerLearnMore_ = document.querySelector('#banner-learn-more');
const doSavePhoto = async (result, name) => {
cca.metrics.log(
cca.metrics.Type.CAPTURE, this.facingMode_, 0, result.resolution);
......@@ -152,14 +142,6 @@ cca.views.Camera = function(
document.querySelectorAll('#stop-takephoto, #stop-recordvideo')
.forEach((btn) => btn.addEventListener('click', () => this.endTake_()));
document.querySelector('#banner-close').addEventListener('click', () => {
cca.util.animateCancel(this.banner_);
});
document.querySelector('#banner-learn-more').addEventListener('click', () => {
cca.util.openHelp();
});
// Monitor the states to stop camera when locked/minimized.
chrome.idle.onStateChanged.addListener((newState) => {
this.locked_ = (newState == 'locked');
......@@ -188,21 +170,9 @@ cca.views.Camera.prototype = {
* @override
*/
cca.views.Camera.prototype.focus = function() {
(async () => {
const values = await new Promise((resolve) => {
cca.proxy.browserProxy.localStorageGet(['isIntroShown'], resolve);
});
await this.configuring_;
if (!values.isIntroShown) {
cca.proxy.browserProxy.localStorageSet({isIntroShown: true});
cca.util.animateOnce(this.banner_);
this.bannerLearnMore_.focus({preventScroll: true});
} else {
// Avoid focusing invisible shutters.
document.querySelectorAll('.shutter')
.forEach((btn) => btn.offsetParent && btn.focus());
}
})();
// Avoid focusing invisible shutters.
document.querySelectorAll('.shutter')
.forEach((btn) => btn.offsetParent && btn.focus());
};
......
......@@ -315,18 +315,6 @@
<message desc="Label for switch to take portrait photo mode button." name="IDS_LABEL_SWITCH_TAKE_PORTRAIT_PHOTO_BUTTON">
Portrait
</message>
<message desc="Title of banner shown for introducing new camera App UI." name="IDS_BANNER_TITLE">
A whole new look
</message>
<message desc="Message in the banner shown for introducing new camera App UI." name="IDS_BANNER_MSG">
Your camera now supports new modes and your photos and videos will be available under your Downloads folders.
</message>
<message desc="Label for close introducing new camera App UI banner button." name="IDS_BANNER_CLOSE_BUTTON">
Close
</message>
<message desc="Label for learn more about new camera App UI button." name="IDS_BANNER_LEARN_MORE_BUTTON">
Learn more
</message>
</messages>
</release>
</grit>
......@@ -137,19 +137,6 @@
<button id="gallery-enter" tabindex="0"
i18n-label="gallery_button" hidden></button>
</div>
<div id="banner" class="horizontal-center-stripe" aria-live="polite">
<div id="banner-title">
<div id="banner-title-icon"></div>
<span id="banner-title-text" i18n-content="banner_title"></span>
</div>
<div id="banner-msg">
<span i18n-content="banner_msg"></span>
<button id="banner-learn-more"
i18n-content="banner_learn_more_button">
</button>
</div>
<button id="banner-close" i18n-label="banner_close_button"></button>
</div>
<div class="bottom-stripe left-stripe buttons circle">
<button id="switch-device" tabindex="0"
i18n-label="switch_camera_button"></button>
......
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