Chromium Code Reviews| Index: android_webview/browser/compositor_id.cc |
| diff --git a/android_webview/browser/compositor_id.cc b/android_webview/browser/compositor_id.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..65cdba0b305f38adb7cb91339ab09e76e29bfbd6 |
| --- /dev/null |
| +++ b/android_webview/browser/compositor_id.cc |
| @@ -0,0 +1,25 @@ |
| +// 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. |
| + |
| +#include "android_webview/browser/compositor_id.h" |
| +#include "content/public/common/child_process_host.h" |
| + |
| +namespace android_webview { |
| + |
| +CompositorID::CompositorID() |
| + : process_id(content::ChildProcessHost::kInvalidUniqueID), |
| + routing_id(content::ChildProcessHost::kInvalidUniqueID) {} |
| + |
| +CompositorID::CompositorID(int process_id, int routing_id) |
| + : process_id(process_id), routing_id(routing_id) {} |
| + |
| +CompositorID::CompositorID(const CompositorID& other) = default; |
| + |
| +bool CompositorIDIsDifferent::operator()(const CompositorID& lhs, |
|
boliu
2016/06/03 02:18:20
need sorting, ie this should be <, not ==
hush (inactive)
2016/06/09 22:44:52
done
|
| + const CompositorID& rhs) const { |
| + return (lhs.process_id != rhs.process_id) || |
| + (lhs.routing_id != rhs.routing_id); |
| +} |
| + |
| +} // namespace android_webview |