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

Side by Side Diff: public/web/WebElementCollection.h

Issue 455883003: Cleanup namespace usage in public/web/Web[A-M]*.h. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « public/web/WebElement.h ('k') | public/web/WebFontDescription.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2014 Samsung Electronics. All rights reserved. 3 * Copyright (C) 2014 Samsung Electronics. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 17 matching lines...) Expand all
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32 #ifndef WebElementCollection_h 32 #ifndef WebElementCollection_h
33 #define WebElementCollection_h 33 #define WebElementCollection_h
34 34
35 #include "../platform/WebCommon.h" 35 #include "../platform/WebCommon.h"
36 #include "../platform/WebPrivatePtr.h" 36 #include "../platform/WebPrivatePtr.h"
37 37
38 namespace blink { class HTMLCollection; }
39 #if BLINK_IMPLEMENTATION 38 #if BLINK_IMPLEMENTATION
40 #include "platform/heap/Handle.h" 39 #include "platform/heap/Handle.h"
41 namespace WTF { template <typename T> class PassRefPtr; } 40 namespace WTF { template <typename T> class PassRefPtr; }
42 #endif 41 #endif
43 42
44 namespace blink { 43 namespace blink {
44
45 class HTMLCollection;
45 class WebElement; 46 class WebElement;
46 47
47 // Provides readonly access to some properties of a DOM node. 48 // Provides readonly access to some properties of a DOM node.
48 class WebElementCollection { 49 class WebElementCollection {
49 public: 50 public:
50 ~WebElementCollection() { reset(); } 51 ~WebElementCollection() { reset(); }
51 52
52 WebElementCollection() : m_current(0) { } 53 WebElementCollection() : m_current(0) { }
53 WebElementCollection(const WebElementCollection& n) { assign(n); } 54 WebElementCollection(const WebElementCollection& n) { assign(n); }
54 WebElementCollection& operator=(const WebElementCollection& n) 55 WebElementCollection& operator=(const WebElementCollection& n)
55 { 56 {
56 assign(n); 57 assign(n);
57 return *this; 58 return *this;
58 } 59 }
59 60
60 bool isNull() const { return m_private.isNull(); } 61 bool isNull() const { return m_private.isNull(); }
61 62
62 BLINK_EXPORT void reset(); 63 BLINK_EXPORT void reset();
63 BLINK_EXPORT void assign(const WebElementCollection&); 64 BLINK_EXPORT void assign(const WebElementCollection&);
64 65
65 BLINK_EXPORT unsigned length() const; 66 BLINK_EXPORT unsigned length() const;
66 BLINK_EXPORT WebElement nextItem() const; 67 BLINK_EXPORT WebElement nextItem() const;
67 BLINK_EXPORT WebElement firstItem() const; 68 BLINK_EXPORT WebElement firstItem() const;
68 69
69 #if BLINK_IMPLEMENTATION 70 #if BLINK_IMPLEMENTATION
70 WebElementCollection(const PassRefPtrWillBeRawPtr<blink::HTMLCollection>&); 71 WebElementCollection(const PassRefPtrWillBeRawPtr<HTMLCollection>&);
71 WebElementCollection& operator=(const PassRefPtrWillBeRawPtr<blink::HTMLColl ection>&); 72 WebElementCollection& operator=(const PassRefPtrWillBeRawPtr<HTMLCollection> &);
72 #endif 73 #endif
73 74
74 private: 75 private:
75 WebPrivatePtr<blink::HTMLCollection> m_private; 76 WebPrivatePtr<HTMLCollection> m_private;
76 mutable unsigned m_current; 77 mutable unsigned m_current;
77 }; 78 };
78 79
79 } // namespace blink 80 } // namespace blink
80 81
81 #endif 82 #endif
OLDNEW
« no previous file with comments | « public/web/WebElement.h ('k') | public/web/WebFontDescription.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698