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

Side by Side Diff: cc/test/test_context_support.cc

Issue 2278283003: Refactor client visibility handling (Closed)
Patch Set: feedback Created 4 years, 3 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
OLDNEW
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 #include "cc/test/test_context_support.h" 5 #include "cc/test/test_context_support.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 } 84 }
85 85
86 uint64_t TestContextSupport::ShareGroupTracingGUID() const { 86 uint64_t TestContextSupport::ShareGroupTracingGUID() const {
87 NOTIMPLEMENTED(); 87 NOTIMPLEMENTED();
88 return 0; 88 return 0;
89 } 89 }
90 90
91 void TestContextSupport::SetErrorMessageCallback( 91 void TestContextSupport::SetErrorMessageCallback(
92 const base::Callback<void(const char*, int32_t)>& callback) {} 92 const base::Callback<void(const char*, int32_t)>& callback) {}
93 93
94 void TestContextSupport::SetClientVisible(int client_id, bool is_visible) {
95 if (is_visible) {
96 visible_clients_.insert(client_id);
97 } else {
98 auto found = visible_clients_.find(client_id);
99 if (found != visible_clients_.end())
100 visible_clients_.erase(found);
101 }
102 }
103
104 bool TestContextSupport::AnyClientsVisible() const {
105 return !visible_clients_.empty();
106 }
107
108 } // namespace cc 94 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698