OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
84 WebURL baseURL; | 84 WebURL baseURL; |
85 }; | 85 }; |
86 | 86 |
87 WebDragData() { } | 87 WebDragData() { } |
88 WebDragData(const WebDragData& object) { assign(object); } | 88 WebDragData(const WebDragData& object) { assign(object); } |
89 WebDragData& operator=(const WebDragData& object) | 89 WebDragData& operator=(const WebDragData& object) |
90 { | 90 { |
91 assign(object); | 91 assign(object); |
92 return *this; | 92 return *this; |
93 } | 93 } |
94 ~WebDragData() { reset(); } | 94 ~WebDragData() |
95 { | |
96 #if BLINK_IMPLEMENTATION | |
97 m_private.reset(); | |
98 #else | |
99 reset(); | |
100 #endif | |
101 } | |
95 | 102 |
96 bool isNull() const { return m_private.isNull(); } | 103 bool isNull() const { return m_private.isNull(); } |
97 | 104 |
98 BLINK_EXPORT void initialize(); | 105 BLINK_EXPORT void initialize(); |
99 BLINK_EXPORT void reset(); | 106 BLINK_EXPORT void reset(); |
100 BLINK_EXPORT void assign(const WebDragData&); | 107 BLINK_EXPORT void assign(const WebDragData&); |
101 | 108 |
102 BLINK_EXPORT WebVector<Item> items() const; | 109 BLINK_EXPORT WebVector<Item> items() const; |
103 BLINK_EXPORT void setItems(const WebVector<Item>&); | 110 BLINK_EXPORT void setItems(const WebVector<Item>&); |
104 BLINK_EXPORT void addItem(const Item&); | 111 BLINK_EXPORT void addItem(const Item&); |
105 | 112 |
106 BLINK_EXPORT WebString filesystemId() const; | 113 BLINK_EXPORT WebString filesystemId() const; |
107 BLINK_EXPORT void setFilesystemId(const WebString&); | 114 BLINK_EXPORT void setFilesystemId(const WebString&); |
108 | 115 |
109 #if BLINK_IMPLEMENTATION | 116 #if BLINK_IMPLEMENTATION |
110 explicit WebDragData(const PassRefPtrWillBeRawPtr<DataObject>&); | 117 // FIXME: to avoid "core depends on web", use inline here. |
tkent
2015/02/18 02:17:57
The problem is "platform depends on core", not "co
tasak
2015/02/23 09:20:33
Done.
| |
111 WebDragData& operator=(const PassRefPtrWillBeRawPtr<DataObject>&); | 118 // After merging blink repository with content repository, redesign |
112 DataObject* getValue() const; | 119 // how core works with web and content. |
120 explicit WebDragData(const PassRefPtrWillBeRawPtr<DataObject>& object) | |
121 { | |
122 m_private = object; | |
123 } | |
124 WebDragData& operator=(const PassRefPtrWillBeRawPtr<DataObject>& object) | |
125 { | |
126 m_private = object; | |
127 return *this; | |
128 } | |
129 DataObject* getValue() const | |
130 { | |
131 return m_private.get(); | |
132 } | |
113 #endif | 133 #endif |
114 | 134 |
115 private: | 135 private: |
116 void ensureMutable(); | 136 void ensureMutable(); |
117 WebPrivatePtr<DataObject> m_private; | 137 WebPrivatePtr<DataObject> m_private; |
118 }; | 138 }; |
119 | 139 |
120 } // namespace blink | 140 } // namespace blink |
121 | 141 |
122 #endif | 142 #endif |
OLD | NEW |