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 |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 * Library General Public License for more details. | 12 * Library General Public License for more details. |
13 * | 13 * |
14 * You should have received a copy of the GNU Library General Public License | 14 * You should have received a copy of the GNU Library General Public License |
15 * along with this library; see the file COPYING.LIB. If not, write to | 15 * along with this library; see the file COPYING.LIB. If not, write to |
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
17 * Boston, MA 02110-1301, USA. | 17 * Boston, MA 02110-1301, USA. |
18 * | 18 * |
19 */ | 19 */ |
20 | 20 |
21 #ifndef HTMLFrameOwnerElement_h | 21 #ifndef HTMLFrameOwnerElement_h |
22 #define HTMLFrameOwnerElement_h | 22 #define HTMLFrameOwnerElement_h |
23 | 23 |
24 #include "core/html/HTMLElement.h" | 24 #include "core/html/HTMLElement.h" |
25 #include "wtf/HashCountedSet.h" | 25 #include "wtf/HashCountedSet.h" |
26 | 26 |
| 27 namespace blink { |
| 28 class WebLayer; |
| 29 } |
| 30 |
27 namespace WebCore { | 31 namespace WebCore { |
28 | 32 |
29 class DOMWindow; | 33 class DOMWindow; |
30 class ExceptionState; | 34 class ExceptionState; |
31 class Frame; | 35 class Frame; |
32 class RenderPart; | 36 class RenderPart; |
33 class SVGDocument; | 37 class SVGDocument; |
34 | 38 |
35 class HTMLFrameOwnerElement : public HTMLElement { | 39 class HTMLFrameOwnerElement : public HTMLElement { |
36 public: | 40 public: |
(...skipping 19 matching lines...) Expand all Loading... |
56 | 60 |
57 SandboxFlags sandboxFlags() const { return m_sandboxFlags; } | 61 SandboxFlags sandboxFlags() const { return m_sandboxFlags; } |
58 | 62 |
59 virtual bool loadedNonEmptyDocument() const { return false; } | 63 virtual bool loadedNonEmptyDocument() const { return false; } |
60 virtual void didLoadNonEmptyDocument() { } | 64 virtual void didLoadNonEmptyDocument() { } |
61 | 65 |
62 virtual void renderFallbackContent() { } | 66 virtual void renderFallbackContent() { } |
63 | 67 |
64 virtual bool isObjectElement() const { return false; } | 68 virtual bool isObjectElement() const { return false; } |
65 | 69 |
| 70 void setPlatformLayer(blink::WebLayer* platformLayer) { m_platformLayer = pl
atformLayer; } |
| 71 blink::WebLayer* platformLayer() const { return m_platformLayer; } |
| 72 |
66 protected: | 73 protected: |
67 HTMLFrameOwnerElement(const QualifiedName& tagName, Document&); | 74 HTMLFrameOwnerElement(const QualifiedName& tagName, Document&); |
68 void setSandboxFlags(SandboxFlags); | 75 void setSandboxFlags(SandboxFlags); |
69 | 76 |
70 bool loadOrRedirectSubframe(const KURL&, const AtomicString& frameName, bool
lockBackForwardList); | 77 bool loadOrRedirectSubframe(const KURL&, const AtomicString& frameName, bool
lockBackForwardList); |
71 | 78 |
72 private: | 79 private: |
73 virtual bool isKeyboardFocusable() const OVERRIDE; | 80 virtual bool isKeyboardFocusable() const OVERRIDE; |
74 virtual bool isFrameOwnerElement() const OVERRIDE { return true; } | 81 virtual bool isFrameOwnerElement() const OVERRIDE { return true; } |
75 | 82 |
76 Frame* m_contentFrame; | 83 Frame* m_contentFrame; |
77 SandboxFlags m_sandboxFlags; | 84 SandboxFlags m_sandboxFlags; |
| 85 |
| 86 // This layer is for frames whose contents are being renderered in a separat
e process. |
| 87 blink::WebLayer* m_platformLayer; |
78 }; | 88 }; |
79 | 89 |
80 DEFINE_NODE_TYPE_CASTS(HTMLFrameOwnerElement, isFrameOwnerElement()); | 90 DEFINE_NODE_TYPE_CASTS(HTMLFrameOwnerElement, isFrameOwnerElement()); |
81 | 91 |
82 class SubframeLoadingDisabler { | 92 class SubframeLoadingDisabler { |
83 public: | 93 public: |
84 explicit SubframeLoadingDisabler(Node& root) | 94 explicit SubframeLoadingDisabler(Node& root) |
85 : m_root(root) | 95 : m_root(root) |
86 { | 96 { |
87 disabledSubtreeRoots().add(&m_root); | 97 disabledSubtreeRoots().add(&m_root); |
(...skipping 19 matching lines...) Expand all Loading... |
107 DEFINE_STATIC_LOCAL(HashCountedSet<Node*>, nodes, ()); | 117 DEFINE_STATIC_LOCAL(HashCountedSet<Node*>, nodes, ()); |
108 return nodes; | 118 return nodes; |
109 } | 119 } |
110 | 120 |
111 Node& m_root; | 121 Node& m_root; |
112 }; | 122 }; |
113 | 123 |
114 } // namespace WebCore | 124 } // namespace WebCore |
115 | 125 |
116 #endif // HTMLFrameOwnerElement_h | 126 #endif // HTMLFrameOwnerElement_h |
OLD | NEW |