Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1498)

Unified Diff: cc/surfaces/local_surface_id.h

Issue 2661543002: Rename LocalFrameId to LocalSurfaceId (Closed)
Patch Set: c Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/surfaces/local_frame_id.cc ('k') | cc/surfaces/local_surface_id.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/local_surface_id.h
diff --git a/cc/surfaces/local_frame_id.h b/cc/surfaces/local_surface_id.h
similarity index 53%
rename from cc/surfaces/local_frame_id.h
rename to cc/surfaces/local_surface_id.h
index 7773b9646cbcf85c6cef9d6eaec0b7cf8ef628d1..ef8be591a97822e7885290ebbe2e095fa2e7855e 100644
--- a/cc/surfaces/local_frame_id.h
+++ b/cc/surfaces/local_surface_id.h
@@ -1,9 +1,9 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
+// 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.
-#ifndef CC_SURFACES_LOCAL_FRAME_ID_H_
-#define CC_SURFACES_LOCAL_FRAME_ID_H_
+#ifndef CC_SURFACES_LOCAL_SURFACE_ID_H_
+#define CC_SURFACES_LOCAL_SURFACE_ID_H_
#include <inttypes.h>
@@ -17,17 +17,18 @@
namespace cc {
namespace mojom {
-class LocalFrameIdDataView;
+class LocalSurfaceIdDataView;
}
-class LocalFrameId {
+class LocalSurfaceId {
public:
- constexpr LocalFrameId() : local_id_(0) {}
+ constexpr LocalSurfaceId() : local_id_(0) {}
- constexpr LocalFrameId(const LocalFrameId& other)
+ constexpr LocalSurfaceId(const LocalSurfaceId& other)
: local_id_(other.local_id_), nonce_(other.nonce_) {}
- constexpr LocalFrameId(uint32_t local_id, const base::UnguessableToken& nonce)
+ constexpr LocalSurfaceId(uint32_t local_id,
+ const base::UnguessableToken& nonce)
: local_id_(local_id), nonce_(nonce) {}
constexpr bool is_valid() const {
@@ -38,13 +39,15 @@ class LocalFrameId {
constexpr const base::UnguessableToken& nonce() const { return nonce_; }
- bool operator==(const LocalFrameId& other) const {
+ bool operator==(const LocalSurfaceId& other) const {
return local_id_ == other.local_id_ && nonce_ == other.nonce_;
}
- bool operator!=(const LocalFrameId& other) const { return !(*this == other); }
+ bool operator!=(const LocalSurfaceId& other) const {
+ return !(*this == other);
+ }
- bool operator<(const LocalFrameId& other) const {
+ bool operator<(const LocalSurfaceId& other) const {
return std::tie(local_id_, nonce_) <
std::tie(other.local_id_, other.nonce_);
}
@@ -57,18 +60,20 @@ class LocalFrameId {
std::string ToString() const;
private:
- friend struct mojo::StructTraits<mojom::LocalFrameIdDataView, LocalFrameId>;
+ friend struct mojo::StructTraits<mojom::LocalSurfaceIdDataView,
+ LocalSurfaceId>;
uint32_t local_id_;
base::UnguessableToken nonce_;
};
-std::ostream& operator<<(std::ostream& out, const LocalFrameId& local_frame_id);
+std::ostream& operator<<(std::ostream& out,
+ const LocalSurfaceId& local_surface_id);
-struct LocalFrameIdHash {
- size_t operator()(const LocalFrameId& key) const { return key.hash(); }
+struct LocalSurfaceIdHash {
+ size_t operator()(const LocalSurfaceId& key) const { return key.hash(); }
};
} // namespace cc
-#endif // CC_SURFACES_LOCAL_FRAME_ID_H_
+#endif // CC_SURFACES_LOCAL_SURFACE_ID_H_
« no previous file with comments | « cc/surfaces/local_frame_id.cc ('k') | cc/surfaces/local_surface_id.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698