| 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 SKY_ENGINE_CORE_HTML_HTMLIFRAMEELEMENT_H_ | 5 #ifndef SKY_ENGINE_CORE_HTML_HTMLIFRAMEELEMENT_H_ |
| 6 #define SKY_ENGINE_CORE_HTML_HTMLIFRAMEELEMENT_H_ | 6 #define SKY_ENGINE_CORE_HTML_HTMLIFRAMEELEMENT_H_ |
| 7 | 7 |
| 8 #include "gen/sky/core/HTMLNames.h" | 8 #include "gen/sky/core/HTMLNames.h" |
| 9 #include "mojo/services/view_manager/public/cpp/view_observer.h" | 9 #include "mojo/services/view_manager/public/cpp/view_observer.h" |
| 10 #include "sky/engine/core/dom/DOMURLUtils.h" | 10 #include "sky/engine/core/dom/DOMURLUtils.h" |
| 11 #include "sky/engine/core/dom/Document.h" | 11 #include "sky/engine/core/dom/Document.h" |
| 12 #include "sky/engine/core/html/HTMLElement.h" | 12 #include "sky/engine/core/html/HTMLElement.h" |
| 13 #include "sky/engine/wtf/OwnPtr.h" | 13 #include "sky/engine/wtf/OwnPtr.h" |
| 14 | 14 |
| 15 namespace blink { | 15 namespace blink { |
| 16 | 16 |
| 17 class RemoteFrame; | 17 class RemoteFrame; |
| 18 | 18 |
| 19 class HTMLIFrameElement : public HTMLElement, | 19 class HTMLIFrameElement : public HTMLElement, |
| 20 public mojo::ViewObserver { | 20 public mojo::ViewObserver { |
| 21 DEFINE_WRAPPERTYPEINFO(); | 21 DEFINE_WRAPPERTYPEINFO(); |
| 22 public: | 22 public: |
| 23 static PassRefPtr<HTMLIFrameElement> create(Document&); | 23 static PassRefPtr<HTMLIFrameElement> create(Document&); |
| 24 | 24 |
| 25 virtual ~HTMLIFrameElement(); | 25 virtual ~HTMLIFrameElement(); |
| 26 | 26 |
| 27 mojo::View* contentView() const { return m_contentView; } | 27 mojo::View* contentView() const { return m_contentView; } |
| 28 | 28 |
| 29 ScriptValue takeServiceProvider(ScriptState*); |
| 30 |
| 29 private: | 31 private: |
| 30 explicit HTMLIFrameElement(Document&); | 32 explicit HTMLIFrameElement(Document&); |
| 31 | 33 |
| 32 // HTMLElement methods: | 34 // HTMLElement methods: |
| 33 virtual RenderObject* createRenderer(RenderStyle* style) override; | 35 virtual RenderObject* createRenderer(RenderStyle* style) override; |
| 34 | 36 |
| 35 virtual void insertedInto(ContainerNode*) override; | 37 virtual void insertedInto(ContainerNode*) override; |
| 36 virtual void removedFrom(ContainerNode*) override; | 38 virtual void removedFrom(ContainerNode*) override; |
| 37 | 39 |
| 38 // ViewObserver methods: | 40 // ViewObserver methods: |
| 39 void OnViewDestroyed(mojo::View* view) override; | 41 void OnViewDestroyed(mojo::View* view) override; |
| 40 | 42 |
| 41 private: | 43 private: |
| 42 void createView(); | 44 void createView(); |
| 43 | 45 |
| 44 mojo::View* m_contentView; | 46 mojo::View* m_contentView; |
| 47 mojo::ScopedMessagePipeHandle m_serviceProvider; |
| 45 }; | 48 }; |
| 46 | 49 |
| 47 } // namespace blink | 50 } // namespace blink |
| 48 | 51 |
| 49 #endif // SKY_ENGINE_CORE_HTML_HTMLIFRAMEELEMENT_H_ | 52 #endif // SKY_ENGINE_CORE_HTML_HTMLIFRAMEELEMENT_H_ |
| OLD | NEW |