| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "media/base/overlay_info.h" |
| 6 #include "media/base/surface_manager.h" |
| 7 |
| 8 namespace media { |
| 9 |
| 10 OverlayInfo::OverlayInfo() = default; |
| 11 OverlayInfo::OverlayInfo(const OverlayInfo&) = default; |
| 12 |
| 13 void OverlayInfo::MergeWith(const OverlayInfo& other) { |
| 14 if (other.surface_id) |
| 15 surface_id = other.surface_id; |
| 16 if (other.routing_token) |
| 17 routing_token = other.routing_token; |
| 18 if (other.is_fullscreen) |
| 19 is_fullscreen = other.is_fullscreen; |
| 20 } |
| 21 |
| 22 bool OverlayInfo::HasValidSurfaceId() const { |
| 23 return surface_id && *surface_id != SurfaceManager::kNoSurfaceID; |
| 24 } |
| 25 |
| 26 bool OverlayInfo::HasValidRoutingToken() const { |
| 27 return routing_token && *routing_token; |
| 28 } |
| 29 |
| 30 } // namespace media |
| OLD | NEW |