Chromium Code Reviews| Index: chrome/browser/ui/webui/media_router/cast_modes_with_media_sources.h |
| diff --git a/chrome/browser/ui/webui/media_router/cast_modes_with_media_sources.h b/chrome/browser/ui/webui/media_router/cast_modes_with_media_sources.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..b5c388dd543c26a50119e9d5da4fb7022315da51 |
| --- /dev/null |
| +++ b/chrome/browser/ui/webui/media_router/cast_modes_with_media_sources.h |
| @@ -0,0 +1,40 @@ |
| +// Copyright 2016 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 CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_CAST_MODES_WITH_MEDIA_SOURCES_H_ |
| +#define CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_CAST_MODES_WITH_MEDIA_SOURCES_H_ |
| + |
| +#include <map> |
| +#include <unordered_set> |
| + |
| +#include "chrome/browser/media/router/media_source.h" |
| +#include "chrome/browser/ui/webui/media_router/media_cast_mode.h" |
| + |
| +namespace media_router { |
| + |
| +// |
|
mark a. foltz
2016/08/31 05:18:55
Finish class level comment
takumif
2016/09/01 21:09:25
Oops. Done.
|
| +class CastModesWithMediaSources { |
| + public: |
| + CastModesWithMediaSources(); |
| + CastModesWithMediaSources(const CastModesWithMediaSources& other); |
| + ~CastModesWithMediaSources(); |
| + |
| + void AddSource(const MediaSource& source, MediaCastMode cast_mode); |
| + void RemoveSource(const MediaSource& source, MediaCastMode cast_mode); |
| + bool HasSource(const MediaSource& source, MediaCastMode cast_mode) const; |
| + |
| + void RemoveCastMode(MediaCastMode cast_mode); |
| + |
| + CastModeSet GetCastModes() const; |
| + |
| + bool IsEmpty() const; |
|
mark a. foltz
2016/08/31 05:18:54
Does this mean the cast mode set is empty? Please
takumif
2016/09/01 21:09:25
Done.
|
| + |
| + private: |
| + std::map<MediaCastMode, std::unordered_set<MediaSource, MediaSource::Hash>> |
| + cast_modes_; |
| +}; |
| + |
| +} // namespace media_router |
| + |
| +#endif // CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_CAST_MODES_WITH_MEDIA_SOURCES_H_ |