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

Side by Side Diff: sky/engine/core/app/Module.h

Issue 922893002: Merge the Sky Engine changes from the SkyDart branch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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/app/Application.idl ('k') | sky/engine/core/app/Module.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_APP_MODULE_H_ 5 #ifndef SKY_ENGINE_CORE_APP_MODULE_H_
6 #define SKY_ENGINE_CORE_APP_MODULE_H_ 6 #define SKY_ENGINE_CORE_APP_MODULE_H_
7 7
8 #include "sky/engine/core/app/AbstractModule.h" 8 #include "sky/engine/core/app/AbstractModule.h"
9 9
10 namespace blink { 10 namespace blink {
11 class Application; 11 class Application;
12 12
13 class Module : public AbstractModule { 13 class Module : public AbstractModule {
14 DEFINE_WRAPPERTYPEINFO();
15 public: 14 public:
16 static PassRefPtr<Module> create(ExecutionContext* context, 15 static PassRefPtr<Module> create(ExecutionContext* context,
17 Application* application, 16 Application* application,
18 PassRefPtr<Document> document, 17 PassRefPtr<Document> document,
19 const String& url) { 18 const String& url) {
20 return adoptRef(new Module(context, application, document, url)); 19 return adoptRef(new Module(context, application, document, url));
21 } 20 }
22 21
23 virtual ~Module(); 22 virtual ~Module();
24 23
25 Application* application() const { return application_.get(); } 24 Application* application() const { return application_.get(); }
26 25
27 void setExports(ScriptState*, const ScriptValue& exports);
28 const ScriptValue& exports(ScriptState*) const;
29
30 private: 26 private:
31 Module(ExecutionContext* context, 27 Module(ExecutionContext* context,
32 Application* application, 28 Application* application,
33 PassRefPtr<Document> document, 29 PassRefPtr<Document> document,
34 const String& url); 30 const String& url);
35 const AtomicString& interfaceName() const override; 31 const AtomicString& interfaceName() const override;
36 32
37 Application* GetApplication() override; 33 Application* GetApplication() override;
38 34
39 RefPtr<Application> application_; 35 RefPtr<Application> application_;
40 mutable ScriptValue exports_;
41 }; 36 };
42 37
43 } // namespace blink 38 } // namespace blink
44 39
45 #endif // SKY_ENGINE_CORE_APP_MODULE_H_ 40 #endif // SKY_ENGINE_CORE_APP_MODULE_H_
OLDNEW
« no previous file with comments | « sky/engine/core/app/Application.idl ('k') | sky/engine/core/app/Module.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698