| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef HTMLIFrameElement_h | 5 #ifndef HTMLIFrameElement_h |
| 6 #define HTMLIFrameElement_h | 6 #define HTMLIFrameElement_h |
| 7 | 7 |
| 8 #include "core/HTMLNames.h" | 8 #include "core/HTMLNames.h" |
| 9 #include "core/dom/DOMURLUtils.h" | 9 #include "core/dom/DOMURLUtils.h" |
| 10 #include "core/dom/Document.h" | 10 #include "core/dom/Document.h" |
| 11 #include "core/html/HTMLElement.h" | 11 #include "core/html/HTMLElement.h" |
| 12 #include "mojo/services/public/cpp/view_manager/view_observer.h" |
| 13 #include "wtf/OwnPtr.h" |
| 12 | 14 |
| 13 namespace blink { | 15 namespace blink { |
| 14 | 16 |
| 15 class HTMLIFrameElement : public HTMLElement { | 17 class RemoteFrame; |
| 18 |
| 19 class HTMLIFrameElement : public HTMLElement, |
| 20 public mojo::ViewObserver { |
| 16 DEFINE_WRAPPERTYPEINFO(); | 21 DEFINE_WRAPPERTYPEINFO(); |
| 17 public: | 22 public: |
| 18 static PassRefPtr<HTMLIFrameElement> create(Document&); | 23 static PassRefPtr<HTMLIFrameElement> create(Document&); |
| 19 | 24 |
| 20 virtual ~HTMLIFrameElement(); | 25 virtual ~HTMLIFrameElement(); |
| 21 | 26 |
| 27 mojo::View* contentView() const { return m_contentView; } |
| 28 |
| 22 private: | 29 private: |
| 23 explicit HTMLIFrameElement(Document&); | 30 explicit HTMLIFrameElement(Document&); |
| 24 | 31 |
| 32 // HTMLElement methods: |
| 25 virtual RenderObject* createRenderer(RenderStyle* style) override; | 33 virtual RenderObject* createRenderer(RenderStyle* style) override; |
| 26 | 34 |
| 27 virtual InsertionNotificationRequest insertedInto(ContainerNode*) override; | 35 virtual InsertionNotificationRequest insertedInto(ContainerNode*) override; |
| 28 virtual void removedFrom(ContainerNode*) override; | 36 virtual void removedFrom(ContainerNode*) override; |
| 29 | 37 |
| 38 // ViewObserver methods: |
| 39 void OnViewDestroyed(mojo::View* view) override; |
| 40 |
| 30 private: | 41 private: |
| 31 void createView(); | 42 void createView(); |
| 43 |
| 44 mojo::View* m_contentView; |
| 32 }; | 45 }; |
| 33 | 46 |
| 34 } // namespace blink | 47 } // namespace blink |
| 35 | 48 |
| 36 #endif // HTMLIFrameElement_h | 49 #endif // HTMLIFrameElement_h |
| OLD | NEW |