OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 19 matching lines...) Expand all Loading... |
30 | 30 |
31 #ifndef WebPrivatePtr_h | 31 #ifndef WebPrivatePtr_h |
32 #define WebPrivatePtr_h | 32 #define WebPrivatePtr_h |
33 | 33 |
34 #include "WebCommon.h" | 34 #include "WebCommon.h" |
35 | 35 |
36 #if INSIDE_BLINK | 36 #if INSIDE_BLINK |
37 #include "wtf/PassRefPtr.h" | 37 #include "wtf/PassRefPtr.h" |
38 #endif | 38 #endif |
39 | 39 |
40 namespace WebKit { | 40 namespace blink { |
41 | 41 |
42 // This class is an implementation detail of the WebKit API. It exists | 42 // This class is an implementation detail of the WebKit API. It exists |
43 // to help simplify the implementation of WebKit interfaces that merely | 43 // to help simplify the implementation of WebKit interfaces that merely |
44 // wrap a reference counted WebCore class. | 44 // wrap a reference counted WebCore class. |
45 // | 45 // |
46 // A typical implementation of a class which uses WebPrivatePtr might look like | 46 // A typical implementation of a class which uses WebPrivatePtr might look like |
47 // this: | 47 // this: |
48 // class WebFoo { | 48 // class WebFoo { |
49 // public: | 49 // public: |
50 // virtual ~WebFoo() { } // Only necessary if WebFoo will be used as a | 50 // virtual ~WebFoo() { } // Only necessary if WebFoo will be used as a |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 // counting properly. | 134 // counting properly. |
135 WebPrivatePtr<T>& operator=(const WebPrivatePtr<T>& other); | 135 WebPrivatePtr<T>& operator=(const WebPrivatePtr<T>& other); |
136 #endif | 136 #endif |
137 // Disable the copy constructor; classes that contain a WebPrivatePtr | 137 // Disable the copy constructor; classes that contain a WebPrivatePtr |
138 // should implement their copy constructor using assign(). | 138 // should implement their copy constructor using assign(). |
139 WebPrivatePtr(const WebPrivatePtr<T>&); | 139 WebPrivatePtr(const WebPrivatePtr<T>&); |
140 | 140 |
141 T* m_ptr; | 141 T* m_ptr; |
142 }; | 142 }; |
143 | 143 |
144 } // namespace WebKit | 144 } // namespace blink |
145 | 145 |
146 #endif | 146 #endif |
OLD | NEW |