OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 22 matching lines...) Expand all Loading... |
33 #include "platform/weborigin/KURL.h" | 33 #include "platform/weborigin/KURL.h" |
34 #include "public/platform/WebPoint.h" | 34 #include "public/platform/WebPoint.h" |
35 #include "public/platform/WebURL.h" | 35 #include "public/platform/WebURL.h" |
36 #include "public/web/WebElement.h" | 36 #include "public/web/WebElement.h" |
37 #include "public/web/WebNode.h" | 37 #include "public/web/WebNode.h" |
38 | 38 |
39 namespace blink { | 39 namespace blink { |
40 | 40 |
41 class WebHitTestResultPrivate : public GarbageCollectedFinalized<WebHitTestResul
tPrivate> { | 41 class WebHitTestResultPrivate : public GarbageCollectedFinalized<WebHitTestResul
tPrivate> { |
42 public: | 42 public: |
43 static RawPtr<WebHitTestResultPrivate> create(const HitTestResult&); | 43 static WebHitTestResultPrivate* create(const HitTestResult&); |
44 static RawPtr<WebHitTestResultPrivate> create(const WebHitTestResultPrivate&
); | 44 static WebHitTestResultPrivate* create(const WebHitTestResultPrivate&); |
45 DEFINE_INLINE_TRACE() { visitor->trace(m_result); } | 45 DEFINE_INLINE_TRACE() { visitor->trace(m_result); } |
46 const HitTestResult& result() const { return m_result; } | 46 const HitTestResult& result() const { return m_result; } |
47 | 47 |
48 private: | 48 private: |
49 WebHitTestResultPrivate(const HitTestResult&); | 49 WebHitTestResultPrivate(const HitTestResult&); |
50 WebHitTestResultPrivate(const WebHitTestResultPrivate&); | 50 WebHitTestResultPrivate(const WebHitTestResultPrivate&); |
51 | 51 |
52 HitTestResult m_result; | 52 HitTestResult m_result; |
53 }; | 53 }; |
54 | 54 |
55 inline WebHitTestResultPrivate::WebHitTestResultPrivate(const HitTestResult& res
ult) | 55 inline WebHitTestResultPrivate::WebHitTestResultPrivate(const HitTestResult& res
ult) |
56 : m_result(result) | 56 : m_result(result) |
57 { | 57 { |
58 } | 58 } |
59 | 59 |
60 inline WebHitTestResultPrivate::WebHitTestResultPrivate(const WebHitTestResultPr
ivate& result) | 60 inline WebHitTestResultPrivate::WebHitTestResultPrivate(const WebHitTestResultPr
ivate& result) |
61 : m_result(result.m_result) | 61 : m_result(result.m_result) |
62 { | 62 { |
63 } | 63 } |
64 | 64 |
65 RawPtr<WebHitTestResultPrivate> WebHitTestResultPrivate::create(const HitTestRes
ult& result) | 65 WebHitTestResultPrivate* WebHitTestResultPrivate::create(const HitTestResult& re
sult) |
66 { | 66 { |
67 return new WebHitTestResultPrivate(result); | 67 return new WebHitTestResultPrivate(result); |
68 } | 68 } |
69 | 69 |
70 RawPtr<WebHitTestResultPrivate> WebHitTestResultPrivate::create(const WebHitTest
ResultPrivate& result) | 70 WebHitTestResultPrivate* WebHitTestResultPrivate::create(const WebHitTestResultP
rivate& result) |
71 { | 71 { |
72 return new WebHitTestResultPrivate(result); | 72 return new WebHitTestResultPrivate(result); |
73 } | 73 } |
74 | 74 |
75 WebNode WebHitTestResult::node() const | 75 WebNode WebHitTestResult::node() const |
76 { | 76 { |
77 return WebNode(m_private->result().innerNode()); | 77 return WebNode(m_private->result().innerNode()); |
78 } | 78 } |
79 | 79 |
80 WebPoint WebHitTestResult::localPoint() const | 80 WebPoint WebHitTestResult::localPoint() const |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 else | 125 else |
126 m_private = WebHitTestResultPrivate::create(*info.m_private.get()); | 126 m_private = WebHitTestResultPrivate::create(*info.m_private.get()); |
127 } | 127 } |
128 | 128 |
129 void WebHitTestResult::reset() | 129 void WebHitTestResult::reset() |
130 { | 130 { |
131 m_private.reset(); | 131 m_private.reset(); |
132 } | 132 } |
133 | 133 |
134 } // namespace blink | 134 } // namespace blink |
OLD | NEW |