OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CompositedLayerMappingPtr_h | |
6 #define CompositedLayerMappingPtr_h | |
7 | |
8 #include "wtf/Assertions.h" | |
9 | |
10 namespace blink { | |
11 | |
12 class CompositedLayerMapping; | |
13 | |
14 class CompositedLayerMappingPtr { | |
15 public: | |
16 CompositedLayerMappingPtr(CompositedLayerMapping* mapping) | |
17 : m_mapping(mapping) | |
18 { | |
19 } | |
20 | |
21 CompositedLayerMapping& operator*() const | |
22 { | |
23 ASSERT(m_mapping); | |
24 return *m_mapping; | |
25 } | |
26 | |
27 CompositedLayerMapping* operator->() const | |
28 { | |
29 ASSERT(m_mapping); | |
30 return m_mapping; | |
31 } | |
32 | |
33 private: | |
34 CompositedLayerMapping* m_mapping; | |
35 }; | |
36 | |
37 } // namespace blink | |
38 | |
39 #endif // CompositedLayerMappingPtr_h | |
OLD | NEW |