Commit 255869c3 authored by Daniel Bratell's avatar Daniel Bratell Committed by Commit Bot

Move kMediaStreamSource* constants to blink_common.dll

kMediaStreamSourceTab, kMediaStreamSourceScreen,
kMediaStreamSourceDesktop and kMediaStreamSourceSystem were
declared to be exported from both blink_platform.dll and
blink_common.dll. In some build configurations that
inconsistency caused build errors:

In file included from third_party/blink/renderer/platform/mediastream/media_stream_center.cc:42:
In file included from third_party/blink/renderer/platform/mediastream/media_stream_descriptor.h:37:
In file included from third_party/blink/renderer/platform/mediastream/media_stream_source.h:39:
In file included from third_party/blink/public/platform/modules/mediastream/web_platform_media_stream_source.h:9:
../..\third_party/blink/public/common/mediastream/media_stream_controls.h(17,1): error: 'dllimport' attribute ignored [-Werror,-Wignored-attributes]
BLINK_COMMON_EXPORT extern const char kMediaStreamSourceTab[];

The error is triggered by first seeing the constant with a
declspec(dllexport) (expanded from BLINK_PLATFORM_EXPORT) and
then with a declspec(dllimport) (expanded from
BLINK_COMMON_EXPORT).

Since common can't depend on platform, the constants need to be
in blink_common.dll so this moves them there.

This is only an issue in Windows component builds.

Bug: 704136
Change-Id: I4bcd6c5b29e534ecfc3ffef908a095b2d33f3a44
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1729251Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Auto-Submit: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#682732}
parent bfca9d67
...@@ -6,6 +6,11 @@ ...@@ -6,6 +6,11 @@
namespace blink { namespace blink {
const char kMediaStreamSourceTab[] = "tab";
const char kMediaStreamSourceScreen[] = "screen";
const char kMediaStreamSourceDesktop[] = "desktop";
const char kMediaStreamSourceSystem[] = "system";
TrackControls::TrackControls() {} TrackControls::TrackControls() {}
TrackControls::TrackControls(bool request, mojom::MediaStreamType type) TrackControls::TrackControls(bool request, mojom::MediaStreamType type)
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_MEDIASTREAM_WEB_PLATFORM_MEDIA_STREAM_SOURCE_H_ #define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_MEDIASTREAM_WEB_PLATFORM_MEDIA_STREAM_SOURCE_H_
#include "base/callback.h" #include "base/callback.h"
#include "third_party/blink/public/common/mediastream/media_stream_controls.h"
#include "third_party/blink/public/common/mediastream/media_stream_request.h" #include "third_party/blink/public/common/mediastream/media_stream_request.h"
#include "third_party/blink/public/mojom/mediastream/media_stream.mojom-shared.h" #include "third_party/blink/public/mojom/mediastream/media_stream.mojom-shared.h"
#include "third_party/blink/public/platform/web_common.h" #include "third_party/blink/public/platform/web_common.h"
...@@ -17,15 +18,6 @@ namespace blink { ...@@ -17,15 +18,6 @@ namespace blink {
class MediaStreamSource; class MediaStreamSource;
class WebMediaStreamSource; class WebMediaStreamSource;
// Names for media stream source capture types.
// These are values set via the "chromeMediaSource" constraint.
BLINK_PLATFORM_EXPORT extern const char kMediaStreamSourceTab[];
BLINK_PLATFORM_EXPORT extern const char
kMediaStreamSourceScreen[]; /* video only */
BLINK_PLATFORM_EXPORT extern const char kMediaStreamSourceDesktop[];
BLINK_PLATFORM_EXPORT extern const char
kMediaStreamSourceSystem[]; /* audio only */
class BLINK_PLATFORM_EXPORT WebPlatformMediaStreamSource { class BLINK_PLATFORM_EXPORT WebPlatformMediaStreamSource {
public: public:
using SourceStoppedCallback = using SourceStoppedCallback =
......
...@@ -11,11 +11,6 @@ ...@@ -11,11 +11,6 @@
namespace blink { namespace blink {
const char kMediaStreamSourceTab[] = "tab";
const char kMediaStreamSourceScreen[] = "screen";
const char kMediaStreamSourceDesktop[] = "desktop";
const char kMediaStreamSourceSystem[] = "system";
const char WebPlatformMediaStreamSource::kSourceId[] = "sourceId"; const char WebPlatformMediaStreamSource::kSourceId[] = "sourceId";
WebPlatformMediaStreamSource::WebPlatformMediaStreamSource() {} WebPlatformMediaStreamSource::WebPlatformMediaStreamSource() {}
......
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