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

Side by Side Diff: sky/engine/core/html/HTMLIFrameElement.h

Issue 862943004: <iframe> should expose its mojo::ServiceProvider handle (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « sky/engine/core/BUILD.gn ('k') | sky/engine/core/html/HTMLIFrameElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_
OLDNEW
« no previous file with comments | « sky/engine/core/BUILD.gn ('k') | sky/engine/core/html/HTMLIFrameElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698