Commit 32c76493 authored by Hiroshige Hayashizaki's avatar Hiroshige Hayashizaki Committed by Commit Bot

Remove pragmas for GRIT in modules/media_controls

To CL applies the compile options defined in
tools/grit/grit_rule.gni to media_controls_resource_loader.cc
by adding a deps to a grit rule, and removes
pragmas in the .cc file.

Bug: 839236
Change-Id: I7838d9775e091b10d5a9369c7fce176aced7cefb
Reviewed-on: https://chromium-review.googlesource.com/1043206Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Reviewed-by: default avatarBecca Hughes <beccahughes@chromium.org>
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/master@{#557328}
parent 351c1b08
......@@ -83,6 +83,7 @@ blink_modules_sources("media_controls") {
]
deps = [
":media_controls_resources",
"//services/service_manager/public/cpp",
"//third_party/blink/public:media_controls_resources_header",
]
......
......@@ -30,16 +30,6 @@ MediaControlsResourceLoader::MediaControlsResourceLoader()
MediaControlsResourceLoader::~MediaControlsResourceLoader() = default;
// Official Android builds that have enable_resource_whitelist_generation
// turned on will fail to compile due to an unknown-pragmas warning. In
// Chromium this is expected, but in Blink the compiler treats warnings as
// errors and so will fail to compile.
#if defined(OS_WIN)
#pragma warning(disable : 4068)
#else
#pragma GCC diagnostic push
#pragma GCC diagnostic warning "-Wunknown-pragmas"
#endif
String MediaControlsResourceLoader::GetMediaControlsCSS() const {
return ResourceBundleHelper::UncompressResourceAsString(
RuntimeEnabledFeatures::ModernMediaControlsEnabled()
......@@ -102,13 +92,6 @@ String MediaControlsResourceLoader::GetMediaInterstitialsStyleSheet() {
IDR_UASTYLE_MEDIA_INTERSTITIALS_CSS);
};
// Re-enable the warnings.
#if defined(OS_WIN)
#pragma warning(default : 4068)
#else
#pragma GCC diagnostic pop
#endif
String MediaControlsResourceLoader::GetUAStyleSheet() {
if (ShouldLoadAndroidCSS()) {
return GetMediaControlsCSS() + GetMediaControlsAndroidCSS() +
......
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