Commit 78c5cf50 authored by Gyuyoung Kim's avatar Gyuyoung Kim Committed by Commit Bot

Move AutoplayPolicy enum to an own file

To reduce including a heavy web_preferences.h only when
we need to use AutoplayPolicy enum, this CL moves
AutoplayPolicy enum to autoplay_policy.h file.

Bug: 919392
Change-Id: I0775d15052d679a06fd49c3586c9c789fa4e7894
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2418757Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Reviewed-by: default avatarColin Blundell <blundell@chromium.org>
Commit-Queue: Gyuyoung Kim <gyuyoung@igalia.com>
Cr-Commit-Position: refs/heads/master@{#808864}
parent aedca87d
...@@ -350,6 +350,7 @@ ...@@ -350,6 +350,7 @@
#include "third_party/blink/public/common/loader/referrer_utils.h" #include "third_party/blink/public/common/loader/referrer_utils.h"
#include "third_party/blink/public/common/loader/url_loader_throttle.h" #include "third_party/blink/public/common/loader/url_loader_throttle.h"
#include "third_party/blink/public/common/switches.h" #include "third_party/blink/public/common/switches.h"
#include "third_party/blink/public/common/web_preferences/autoplay_policy.h"
#include "third_party/blink/public/common/web_preferences/image_animation_policy.h" #include "third_party/blink/public/common/web_preferences/image_animation_policy.h"
#include "third_party/blink/public/mojom/renderer_preferences.mojom.h" #include "third_party/blink/public/mojom/renderer_preferences.mojom.h"
#include "third_party/blink/public/mojom/site_engagement/site_engagement.mojom.h" #include "third_party/blink/public/mojom/site_engagement/site_engagement.mojom.h"
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include "content/public/browser/render_widget_host.h" #include "content/public/browser/render_widget_host.h"
#include "content/public/browser/render_widget_host_view.h" #include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents.h"
#include "third_party/blink/public/common/web_preferences/web_preferences.h" #include "third_party/blink/public/common/web_preferences/autoplay_policy.h"
namespace chromecast { namespace chromecast {
......
...@@ -184,6 +184,7 @@ source_set("headers") { ...@@ -184,6 +184,7 @@ source_set("headers") {
"web_cache/web_cache_resource_type_stats.h", "web_cache/web_cache_resource_type_stats.h",
"web_package/signed_exchange_consts.h", "web_package/signed_exchange_consts.h",
"web_package/web_package_request_matcher.h", "web_package/web_package_request_matcher.h",
"web_preferences/autoplay_policy.h",
"web_preferences/editing_behavior_types.h", "web_preferences/editing_behavior_types.h",
"web_preferences/image_animation_policy.h", "web_preferences/image_animation_policy.h",
"web_preferences/web_preferences.h", "web_preferences/web_preferences.h",
......
// Copyright 2020 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.
#ifndef THIRD_PARTY_BLINK_PUBLIC_COMMON_WEB_PREFERENCES_AUTOPLAY_POLICY_H_
#define THIRD_PARTY_BLINK_PUBLIC_COMMON_WEB_PREFERENCES_AUTOPLAY_POLICY_H_
namespace blink {
namespace web_pref {
// Defines the autoplay policy to be used.
enum class AutoplayPolicy {
kNoUserGestureRequired,
kUserGestureRequired,
kDocumentUserActivationRequired,
};
} // namespace web_pref
} // namespace blink
#endif // THIRD_PARTY_BLINK_PUBLIC_COMMON_WEB_PREFERENCES_AUTOPLAY_POLICY_H_
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include "net/nqe/effective_connection_type.h" #include "net/nqe/effective_connection_type.h"
#include "third_party/blink/public/common/common_export.h" #include "third_party/blink/public/common/common_export.h"
#include "third_party/blink/public/common/css/preferred_color_scheme.h" #include "third_party/blink/public/common/css/preferred_color_scheme.h"
#include "third_party/blink/public/common/web_preferences/autoplay_policy.h"
#include "third_party/blink/public/common/web_preferences/editing_behavior_types.h" #include "third_party/blink/public/common/web_preferences/editing_behavior_types.h"
#include "third_party/blink/public/common/web_preferences/image_animation_policy.h" #include "third_party/blink/public/common/web_preferences/image_animation_policy.h"
#include "third_party/blink/public/mojom/v8_cache_options.mojom-forward.h" #include "third_party/blink/public/mojom/v8_cache_options.mojom-forward.h"
...@@ -33,14 +34,6 @@ typedef std::map<std::string, base::string16> ScriptFontFamilyMap; ...@@ -33,14 +34,6 @@ typedef std::map<std::string, base::string16> ScriptFontFamilyMap;
enum class ViewportStyle { DEFAULT, MOBILE, TELEVISION, LAST = TELEVISION }; enum class ViewportStyle { DEFAULT, MOBILE, TELEVISION, LAST = TELEVISION };
// Defines the autoplay policy to be used. Should match the class in
// WebSettings.h.
enum class AutoplayPolicy {
kNoUserGestureRequired,
kUserGestureRequired,
kDocumentUserActivationRequired,
};
// The ISO 15924 script code for undetermined script aka Common. It's the // The ISO 15924 script code for undetermined script aka Common. It's the
// default used on WebKit's side to get/set a font setting when no script is // default used on WebKit's side to get/set a font setting when no script is
// specified. // specified.
......
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