Chromium Code Reviews| Index: media/base/overlay_info.cc |
| diff --git a/media/base/overlay_info.cc b/media/base/overlay_info.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..0be835ace6728fac998647f009ab77ead4a80b3a |
| --- /dev/null |
| +++ b/media/base/overlay_info.cc |
| @@ -0,0 +1,36 @@ |
| +// Copyright 2017 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. |
| + |
| +#include "media/base/overlay_info.h" |
| + |
| +namespace media { |
| + |
| +OverlayInfo::OverlayInfo() = default; |
| +OverlayInfo::OverlayInfo(const OverlayInfo&) = default; |
| + |
| +// static |
| +OverlayInfo OverlayInfo::SurfaceChange(int surface_id) { |
| + OverlayInfo info; |
| + info.surface_id = surface_id; |
| + return info; |
| +} |
| + |
| +// static |
| +OverlayInfo OverlayInfo::RoutingTokenChange( |
| + base::Optional<base::UnguessableToken> token) { |
| + OverlayInfo info; |
| + info.routing_token = token; |
| + return info; |
| +} |
| + |
| +OverlayInfo& OverlayInfo::operator|=(const OverlayInfo& other) { |
| + if (other.surface_id) |
| + surface_id = other.surface_id; |
| + if (other.routing_token) |
|
tguilbert
2017/05/24 19:14:54
Is there a reason why |is_fullscreen| is not copie
liberato (no reviews please)
2017/05/24 21:21:07
because it's error-prone. :) good catch.
i real
|
| + routing_token = other.routing_token; |
| + |
| + return *this; |
| +} |
| + |
| +} // namespace media |