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

Side by Side Diff: ui/compositor/compositor.h

Issue 697953002: ObserverList::HasObserver now takes a const pointer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile errors (ChromeOS unit tests). Created 6 years, 1 month 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 | « ui/aura/window.cc ('k') | ui/compositor/compositor.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef UI_COMPOSITOR_COMPOSITOR_H_ 5 #ifndef UI_COMPOSITOR_COMPOSITOR_H_
6 #define UI_COMPOSITOR_COMPOSITOR_H_ 6 #define UI_COMPOSITOR_COMPOSITOR_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 // Returns the main thread task runner this compositor uses. Users of the 209 // Returns the main thread task runner this compositor uses. Users of the
210 // compositor generally shouldn't use this. 210 // compositor generally shouldn't use this.
211 scoped_refptr<base::SingleThreadTaskRunner> task_runner() const { 211 scoped_refptr<base::SingleThreadTaskRunner> task_runner() const {
212 return task_runner_; 212 return task_runner_;
213 } 213 }
214 214
215 // Compositor does not own observers. It is the responsibility of the 215 // Compositor does not own observers. It is the responsibility of the
216 // observer to remove itself when it is done observing. 216 // observer to remove itself when it is done observing.
217 void AddObserver(CompositorObserver* observer); 217 void AddObserver(CompositorObserver* observer);
218 void RemoveObserver(CompositorObserver* observer); 218 void RemoveObserver(CompositorObserver* observer);
219 bool HasObserver(CompositorObserver* observer); 219 bool HasObserver(const CompositorObserver* observer) const;
220 220
221 void AddAnimationObserver(CompositorAnimationObserver* observer); 221 void AddAnimationObserver(CompositorAnimationObserver* observer);
222 void RemoveAnimationObserver(CompositorAnimationObserver* observer); 222 void RemoveAnimationObserver(CompositorAnimationObserver* observer);
223 bool HasAnimationObserver(CompositorAnimationObserver* observer); 223 bool HasAnimationObserver(const CompositorAnimationObserver* observer) const;
224 224
225 // Creates a compositor lock. Returns NULL if it is not possible to lock at 225 // Creates a compositor lock. Returns NULL if it is not possible to lock at
226 // this time (i.e. we're waiting to complete a previous unlock). 226 // this time (i.e. we're waiting to complete a previous unlock).
227 scoped_refptr<CompositorLock> GetCompositorLock(); 227 scoped_refptr<CompositorLock> GetCompositorLock();
228 228
229 // Internal functions, called back by command-buffer contexts on swap buffer 229 // Internal functions, called back by command-buffer contexts on swap buffer
230 // events. 230 // events.
231 231
232 // Signals swap has been posted. 232 // Signals swap has been posted.
233 void OnSwapBuffersPosted(); 233 void OnSwapBuffersPosted();
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 LayerAnimatorCollection layer_animator_collection_; 335 LayerAnimatorCollection layer_animator_collection_;
336 336
337 base::WeakPtrFactory<Compositor> weak_ptr_factory_; 337 base::WeakPtrFactory<Compositor> weak_ptr_factory_;
338 338
339 DISALLOW_COPY_AND_ASSIGN(Compositor); 339 DISALLOW_COPY_AND_ASSIGN(Compositor);
340 }; 340 };
341 341
342 } // namespace ui 342 } // namespace ui
343 343
344 #endif // UI_COMPOSITOR_COMPOSITOR_H_ 344 #endif // UI_COMPOSITOR_COMPOSITOR_H_
OLDNEW
« no previous file with comments | « ui/aura/window.cc ('k') | ui/compositor/compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698