Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 281 if (AXObjectCache* cache = document().existingAXObjectCache()) | 281 if (AXObjectCache* cache = document().existingAXObjectCache()) |
| 282 cache->childrenChanged(layoutPart); | 282 cache->childrenChanged(layoutPart); |
| 283 } | 283 } |
| 284 return m_widget.release(); | 284 return m_widget.release(); |
| 285 } | 285 } |
| 286 | 286 |
| 287 FrameViewBase* HTMLFrameOwnerElement::ownedWidget() const { | 287 FrameViewBase* HTMLFrameOwnerElement::ownedWidget() const { |
| 288 return m_widget.get(); | 288 return m_widget.get(); |
| 289 } | 289 } |
| 290 | 290 |
| 291 void HTMLFrameOwnerElement::setPlugin(PluginView* pluginView) { | |
| 292 this->setWidget(pluginView); | |
| 293 } | |
| 294 | |
| 295 PluginView* HTMLFrameOwnerElement::releasePlugin() { | |
| 296 DCHECK(!m_widget || m_widget->isPluginView()); | |
|
haraken
2017/03/20 03:06:35
I'd use CHECK until we completely remove FrameView
joelhockey
2017/03/20 03:54:29
I have changed to use toPluginViewOrDie which does
| |
| 297 return toPluginView(this->releaseWidget()); | |
| 298 } | |
| 299 | |
| 300 PluginView* HTMLFrameOwnerElement::ownedPlugin() const { | |
| 301 DCHECK(!m_widget || m_widget->isPluginView()); | |
|
haraken
2017/03/20 03:06:35
Ditto.
joelhockey
2017/03/20 03:54:29
Done
| |
| 302 return toPluginView(this->ownedWidget()); | |
| 303 } | |
| 304 | |
| 291 bool HTMLFrameOwnerElement::loadOrRedirectSubframe( | 305 bool HTMLFrameOwnerElement::loadOrRedirectSubframe( |
| 292 const KURL& url, | 306 const KURL& url, |
| 293 const AtomicString& frameName, | 307 const AtomicString& frameName, |
| 294 bool replaceCurrentItem) { | 308 bool replaceCurrentItem) { |
| 295 LocalFrame* parentFrame = document().frame(); | 309 LocalFrame* parentFrame = document().frame(); |
| 296 if (contentFrame()) { | 310 if (contentFrame()) { |
| 297 contentFrame()->navigate(document(), url, replaceCurrentItem, | 311 contentFrame()->navigate(document(), url, replaceCurrentItem, |
| 298 UserGestureStatus::None); | 312 UserGestureStatus::None); |
| 299 return true; | 313 return true; |
| 300 } | 314 } |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 324 } | 338 } |
| 325 | 339 |
| 326 DEFINE_TRACE(HTMLFrameOwnerElement) { | 340 DEFINE_TRACE(HTMLFrameOwnerElement) { |
| 327 visitor->trace(m_contentFrame); | 341 visitor->trace(m_contentFrame); |
| 328 visitor->trace(m_widget); | 342 visitor->trace(m_widget); |
| 329 HTMLElement::trace(visitor); | 343 HTMLElement::trace(visitor); |
| 330 FrameOwner::trace(visitor); | 344 FrameOwner::trace(visitor); |
| 331 } | 345 } |
| 332 | 346 |
| 333 } // namespace blink | 347 } // namespace blink |
| OLD | NEW |