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

Side by Side Diff: android_webview/browser/compositor_id.cc

Issue 2036023002: Rewire Android WebView's compositor changed signal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use web_contents_ Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « android_webview/browser/compositor_id.h ('k') | android_webview/browser/hardware_renderer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "android_webview/browser/compositor_id.h"
6 #include "content/public/common/child_process_host.h"
7
8 namespace android_webview {
9
10 CompositorID::CompositorID()
11 : process_id(content::ChildProcessHost::kInvalidUniqueID),
12 routing_id(content::ChildProcessHost::kInvalidUniqueID) {}
13
14 CompositorID::CompositorID(int process_id, int routing_id)
15 : process_id(process_id), routing_id(routing_id) {}
16
17 CompositorID::CompositorID(const CompositorID& other) = default;
18
19 CompositorID& CompositorID::operator=(const CompositorID& other) {
20 process_id = other.process_id;
21 routing_id = other.routing_id;
22 return *this;
23 }
24
25 bool CompositorID::Equals(const CompositorID& other) const {
26 return process_id == other.process_id && routing_id == other.routing_id;
27 }
28
29 bool CompositorIDComparator::operator()(const CompositorID& a,
30 const CompositorID& b) const {
31 if (a.process_id == b.process_id) {
32 return a.routing_id < b.routing_id;
33 }
34 return a.process_id < b.process_id;
35 }
36
37 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/browser/compositor_id.h ('k') | android_webview/browser/hardware_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698