| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_PUBLIC_COMMON_DESKTOP_MEDIA_ID_H_ | 5 #ifndef CONTENT_PUBLIC_COMMON_DESKTOP_MEDIA_ID_H_ |
| 6 #define CONTENT_PUBLIC_COMMON_DESKTOP_MEDIA_ID_H_ | 6 #define CONTENT_PUBLIC_COMMON_DESKTOP_MEDIA_ID_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 // Operators so that DesktopMediaID can be used with STL containers. | 39 // Operators so that DesktopMediaID can be used with STL containers. |
| 40 bool operator<(const DesktopMediaID& other) const { | 40 bool operator<(const DesktopMediaID& other) const { |
| 41 return type < other.type || (type == other.type && id < other.id); | 41 return type < other.type || (type == other.type && id < other.id); |
| 42 } | 42 } |
| 43 bool operator==(const DesktopMediaID& other) const { | 43 bool operator==(const DesktopMediaID& other) const { |
| 44 return type == other.type && id == other.id; | 44 return type == other.type && id == other.id; |
| 45 } | 45 } |
| 46 | 46 |
| 47 bool is_null() { return type == TYPE_NONE; } | 47 bool is_null() { return type == TYPE_NONE; } |
| 48 | 48 |
| 49 std::string ToString(); | 49 std::string ToString() const; |
| 50 | 50 |
| 51 Type type; | 51 Type type; |
| 52 Id id; | 52 Id id; |
| 53 }; | 53 }; |
| 54 | 54 |
| 55 } // namespace content | 55 } // namespace content |
| 56 | 56 |
| 57 #endif // CONTENT_PUBLIC_COMMON_DESKTOP_MEDIA_ID_H_ | 57 #endif // CONTENT_PUBLIC_COMMON_DESKTOP_MEDIA_ID_H_ |
| OLD | NEW |