Commit 2808848c authored by Tibor Goldschwendt's avatar Tibor Goldschwendt Committed by Commit Bot

[vr] Add audio assets

Bug: 811987
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I1c26701b29d44b6f381fdf67e821d8ebbc0d6a9b
Reviewed-on: https://chromium-review.googlesource.com/956003Reviewed-by: default avatarChristopher Grant <cjgrant@chromium.org>
Commit-Queue: Tibor Goldschwendt <tiborg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541845}
parent 5af983f9
......@@ -104,6 +104,7 @@ vs-chromium-project.txt
/chrome/browser/resources/software_rendering_list
# Asset files downloaded by gclient runhooks.
/chrome/browser/resources/vr/assets/google_chrome/*.png
/chrome/browser/resources/vr/assets/google_chrome/*.wav
/chrome/browser/spellchecker/internal
/chrome/browser_tests_run.xml
/chrome/chrome_run.xml
......
......@@ -25,6 +25,7 @@ def CheckVersionAndAssetParity(input_api, output_api):
new_version = None
changed_assets = False
changed_version = False
changed_component_list = False
changed_asset_files = {'google_chrome': [], 'chromium': []}
for file in input_api.AffectedFiles():
basename = input_api.os_path.basename(file.LocalPath())
......@@ -37,12 +38,14 @@ def CheckVersionAndAssetParity(input_api, output_api):
dirname = input_api.os_path.basename(
input_api.os_path.dirname(file.LocalPath()))
action = file.Action()
if (dirname in changed_asset_files and extension in {'sha1', 'png'} and
action in {'A', 'D'}):
if (dirname in changed_asset_files and
extension in {'sha1', 'png', 'wav'} and action in {'A', 'D'}):
changed_asset_files[dirname].append((action, basename_without_extension))
if (extension == 'sha1' or basename == 'vr_assets_component_files.json'):
changed_assets = True
if (basename == 'VERSION'):
if basename == 'vr_assets_component_files.json':
changed_component_list = True
if basename == 'VERSION':
changed_version = True
old_version = parse_version.ParseVersion(file.OldContents())
new_version = parse_version.ParseVersion(file.NewContents())
......@@ -50,6 +53,9 @@ def CheckVersionAndAssetParity(input_api, output_api):
local_version_filename = input_api.os_path.join(
input_api.os_path.dirname(input_api.AffectedFiles()[0].LocalPath()),
'VERSION')
local_component_list_filename = input_api.os_path.join(
input_api.os_path.dirname(input_api.AffectedFiles()[0].LocalPath()),
'vr_assets_component_files.json')
if changed_asset_files['google_chrome'] != changed_asset_files['chromium']:
return [
......@@ -60,6 +66,13 @@ def CheckVersionAndAssetParity(input_api, output_api):
input_api.AffectedFiles()[0].LocalPath())))
]
if changed_asset_files['google_chrome'] and not changed_component_list:
return [
output_api.PresubmitError(
'Must update \'%s\' if adding/removing assets.' %
local_component_list_filename)
]
if changed_version and (not old_version or not new_version):
return [
output_api.PresubmitError(
......
MAJOR=1
MINOR=3
\ No newline at end of file
MAJOR=2
MINOR=0
\ No newline at end of file
386f2aa1ef2d9f7464f15e9d0ce3d9bacf2138fe
\ No newline at end of file
45bb0252f7d82e6297a149f33314e01a7f329f40
\ No newline at end of file
bba1d3c97ffc3962676af1c494f7776e63964cb7
\ No newline at end of file
......@@ -2,5 +2,8 @@
"google_chrome/background.png",
"google_chrome/fullscreen_gradient.png",
"google_chrome/incognito_gradient.png",
"google_chrome/normal_gradient.png"
"google_chrome/normal_gradient.png",
"google_chrome/button_click.wav",
"google_chrome/button_hover.wav",
"google_chrome/back_button_click.wav"
]
\ No newline at end of file
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