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

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

Issue 2729543002: Rename platform/Widget to platform/FrameViewBase in web. (Closed)
Patch Set: Created 3 years, 9 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 29 matching lines...) Expand all
40 #include "core/dom/TaskRunnerHelper.h" 40 #include "core/dom/TaskRunnerHelper.h"
41 #include "core/editing/EditingUtilities.h" 41 #include "core/editing/EditingUtilities.h"
42 #include "core/editing/serializers/Serialization.h" 42 #include "core/editing/serializers/Serialization.h"
43 #include "core/events/Event.h" 43 #include "core/events/Event.h"
44 #include "core/html/HTMLCollection.h" 44 #include "core/html/HTMLCollection.h"
45 #include "core/html/HTMLElement.h" 45 #include "core/html/HTMLElement.h"
46 #include "core/layout/LayoutObject.h" 46 #include "core/layout/LayoutObject.h"
47 #include "core/layout/LayoutPart.h" 47 #include "core/layout/LayoutPart.h"
48 #include "modules/accessibility/AXObject.h" 48 #include "modules/accessibility/AXObject.h"
49 #include "modules/accessibility/AXObjectCacheImpl.h" 49 #include "modules/accessibility/AXObjectCacheImpl.h"
50 #include "platform/Widget.h" 50 #include "platform/FrameViewBase.h"
51 #include "public/platform/WebString.h" 51 #include "public/platform/WebString.h"
52 #include "public/web/WebAXObject.h" 52 #include "public/web/WebAXObject.h"
53 #include "public/web/WebDOMEvent.h" 53 #include "public/web/WebDOMEvent.h"
54 #include "public/web/WebDocument.h" 54 #include "public/web/WebDocument.h"
55 #include "public/web/WebElement.h" 55 #include "public/web/WebElement.h"
56 #include "public/web/WebElementCollection.h" 56 #include "public/web/WebElementCollection.h"
57 #include "public/web/WebPluginContainer.h" 57 #include "public/web/WebPluginContainer.h"
58 #include "web/LocalFrameClientImpl.h" 58 #include "web/LocalFrameClientImpl.h"
59 #include "web/WebLocalFrameImpl.h" 59 #include "web/WebLocalFrameImpl.h"
60 #include "web/WebPluginContainerImpl.h" 60 #include "web/WebPluginContainerImpl.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 179
180 WebPluginContainer* WebNode::pluginContainerFromNode(const Node* node) { 180 WebPluginContainer* WebNode::pluginContainerFromNode(const Node* node) {
181 if (!node) 181 if (!node)
182 return nullptr; 182 return nullptr;
183 183
184 if (!isHTMLObjectElement(node) && !isHTMLEmbedElement(node)) 184 if (!isHTMLObjectElement(node) && !isHTMLEmbedElement(node))
185 return nullptr; 185 return nullptr;
186 186
187 LayoutObject* object = node->layoutObject(); 187 LayoutObject* object = node->layoutObject();
188 if (object && object->isLayoutPart()) { 188 if (object && object->isLayoutPart()) {
189 Widget* widget = toLayoutPart(object)->widget(); 189 FrameViewBase* frameViewBase = toLayoutPart(object)->widget();
190 if (widget && widget->isPluginContainer()) 190 if (frameViewBase && frameViewBase->isPluginContainer())
191 return toWebPluginContainerImpl(widget); 191 return toWebPluginContainerImpl(frameViewBase);
192 } 192 }
193 193
194 return nullptr; 194 return nullptr;
195 } 195 }
196 196
197 WebPluginContainer* WebNode::pluginContainer() const { 197 WebPluginContainer* WebNode::pluginContainer() const {
198 return pluginContainerFromNode(constUnwrap<Node>()); 198 return pluginContainerFromNode(constUnwrap<Node>());
199 } 199 }
200 200
201 WebAXObject WebNode::accessibilityObject() { 201 WebAXObject WebNode::accessibilityObject() {
202 WebDocument webDocument = document(); 202 WebDocument webDocument = document();
203 const Document* doc = document().constUnwrap<Document>(); 203 const Document* doc = document().constUnwrap<Document>();
204 AXObjectCacheImpl* cache = toAXObjectCacheImpl(doc->existingAXObjectCache()); 204 AXObjectCacheImpl* cache = toAXObjectCacheImpl(doc->existingAXObjectCache());
205 Node* node = unwrap<Node>(); 205 Node* node = unwrap<Node>();
206 return cache ? WebAXObject(cache->get(node)) : WebAXObject(); 206 return cache ? WebAXObject(cache->get(node)) : WebAXObject();
207 } 207 }
208 208
209 WebNode::WebNode(Node* node) : m_private(node) {} 209 WebNode::WebNode(Node* node) : m_private(node) {}
210 210
211 WebNode& WebNode::operator=(Node* node) { 211 WebNode& WebNode::operator=(Node* node) {
212 m_private = node; 212 m_private = node;
213 return *this; 213 return *this;
214 } 214 }
215 215
216 WebNode::operator Node*() const { 216 WebNode::operator Node*() const {
217 return m_private.get(); 217 return m_private.get();
218 } 218 }
219 219
220 } // namespace blink 220 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebInputEventConversion.cpp ('k') | third_party/WebKit/Source/web/WebPagePopupImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698