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

Side by Side Diff: third_party/WebKit/Source/web/WebNode.cpp

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
OLDNEW
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 #include "public/platform/WebSuspendableTask.h" 50 #include "public/platform/WebSuspendableTask.h"
51 #include "public/web/WebAXObject.h" 51 #include "public/web/WebAXObject.h"
52 #include "public/web/WebDOMEvent.h" 52 #include "public/web/WebDOMEvent.h"
53 #include "public/web/WebDocument.h" 53 #include "public/web/WebDocument.h"
54 #include "public/web/WebElement.h" 54 #include "public/web/WebElement.h"
55 #include "public/web/WebElementCollection.h" 55 #include "public/web/WebElementCollection.h"
56 #include "public/web/WebPluginContainer.h" 56 #include "public/web/WebPluginContainer.h"
57 #include "web/FrameLoaderClientImpl.h" 57 #include "web/FrameLoaderClientImpl.h"
58 #include "web/WebLocalFrameImpl.h" 58 #include "web/WebLocalFrameImpl.h"
59 #include "web/WebPluginContainerImpl.h" 59 #include "web/WebPluginContainerImpl.h"
60 #include "wtf/PtrUtil.h"
61 60
62 namespace blink { 61 namespace blink {
63 62
64 namespace { 63 namespace {
65 64
66 class NodeDispatchSimulatedClickTask: public SuspendableTask { 65 class NodeDispatchSimulatedClickTask: public SuspendableTask {
67 WTF_MAKE_NONCOPYABLE(NodeDispatchSimulatedClickTask); 66 WTF_MAKE_NONCOPYABLE(NodeDispatchSimulatedClickTask);
68 public: 67 public:
69 NodeDispatchSimulatedClickTask(const WebPrivatePtr<Node>& node) 68 NodeDispatchSimulatedClickTask(const WebPrivatePtr<Node>& node)
70 { 69 {
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 return m_private->isDocumentNode(); 188 return m_private->isDocumentNode();
190 } 189 }
191 190
192 bool WebNode::isDocumentTypeNode() const 191 bool WebNode::isDocumentTypeNode() const
193 { 192 {
194 return m_private->getNodeType() == Node::DOCUMENT_TYPE_NODE; 193 return m_private->getNodeType() == Node::DOCUMENT_TYPE_NODE;
195 } 194 }
196 195
197 void WebNode::simulateClick() 196 void WebNode::simulateClick()
198 { 197 {
199 m_private->getExecutionContext()->postSuspendableTask(wrapUnique(new NodeDis patchSimulatedClickTask(m_private))); 198 m_private->getExecutionContext()->postSuspendableTask(adoptPtr(new NodeDispa tchSimulatedClickTask(m_private)));
200 } 199 }
201 200
202 WebElementCollection WebNode::getElementsByHTMLTagName(const WebString& tag) con st 201 WebElementCollection WebNode::getElementsByHTMLTagName(const WebString& tag) con st
203 { 202 {
204 if (m_private->isContainerNode()) 203 if (m_private->isContainerNode())
205 return WebElementCollection(toContainerNode(m_private.get())->getElement sByTagNameNS(HTMLNames::xhtmlNamespaceURI, tag)); 204 return WebElementCollection(toContainerNode(m_private.get())->getElement sByTagNameNS(HTMLNames::xhtmlNamespaceURI, tag));
206 return WebElementCollection(); 205 return WebElementCollection();
207 } 206 }
208 207
209 WebElement WebNode::querySelector(const WebString& selector) const 208 WebElement WebNode::querySelector(const WebString& selector) const
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 m_private = node; 259 m_private = node;
261 return *this; 260 return *this;
262 } 261 }
263 262
264 WebNode::operator Node*() const 263 WebNode::operator Node*() const
265 { 264 {
266 return m_private.get(); 265 return m_private.get();
267 } 266 }
268 267
269 } // namespace blink 268 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebLocalFrameImpl.cpp ('k') | third_party/WebKit/Source/web/WebNodeTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698