summaryrefslogtreecommitdiffstats
path: root/cc/trees/layer_tree_host_common.h
diff options
context:
space:
mode:
authorkhushalsagar <khushalsagar@chromium.org>2016-01-15 12:46:48 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-15 20:48:00 +0000
commit376942135fb8ad3d33340c506ff251f3c3afba3d (patch)
treed65d8ccbee3ffb1555508b03035f8fa65f8746e8 /cc/trees/layer_tree_host_common.h
parent272ad4a2612601ae1c7cd8aca68bf8ada4f5a494 (diff)
downloadchromium_src-376942135fb8ad3d33340c506ff251f3c3afba3d.zip
chromium_src-376942135fb8ad3d33340c506ff251f3c3afba3d.tar.gz
chromium_src-376942135fb8ad3d33340c506ff251f3c3afba3d.tar.bz2
(De)-serialize BeginMainFrameAndCommitState to protobuf.
BUG=550687 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1581773002 Cr-Commit-Position: refs/heads/master@{#369836}
Diffstat (limited to 'cc/trees/layer_tree_host_common.h')
-rw-r--r--cc/trees/layer_tree_host_common.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/cc/trees/layer_tree_host_common.h b/cc/trees/layer_tree_host_common.h
index df74721..4a09194 100644
--- a/cc/trees/layer_tree_host_common.h
+++ b/cc/trees/layer_tree_host_common.h
@@ -22,6 +22,11 @@
namespace cc {
+namespace proto {
+class ScrollUpdateInfo;
+class ScrollAndScaleSet;
+}
+
class LayerImpl;
class Layer;
class SwapPromise;
@@ -154,11 +159,16 @@ class CC_EXPORT LayerTreeHostCommon {
return layers[index];
}
- struct ScrollUpdateInfo {
+ struct CC_EXPORT ScrollUpdateInfo {
int layer_id;
// TODO(miletus): Use ScrollOffset once LayerTreeHost/Blink fully supports
// franctional scroll offset.
gfx::Vector2d scroll_delta;
+
+ bool operator==(const ScrollUpdateInfo& other) const;
+
+ void ToProtobuf(proto::ScrollUpdateInfo* proto) const;
+ void FromProtobuf(const proto::ScrollUpdateInfo& proto);
};
};
@@ -172,6 +182,10 @@ struct CC_EXPORT ScrollAndScaleSet {
float top_controls_delta;
std::vector<scoped_ptr<SwapPromise>> swap_promises;
+ bool EqualsForTesting(const ScrollAndScaleSet& other) const;
+ void ToProtobuf(proto::ScrollAndScaleSet* proto) const;
+ void FromProtobuf(const proto::ScrollAndScaleSet& proto);
+
private:
DISALLOW_COPY_AND_ASSIGN(ScrollAndScaleSet);
};