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

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

Issue 715833002: AbstractModule should accept a PassRefPtr (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « no previous file | sky/engine/core/app/AbstractModule.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_ABSTRACT_MODULE_H_ 5 #ifndef SKY_ENGINE_CORE_APP_ABSTRACT_MODULE_H_
6 #define SKY_ENGINE_CORE_APP_ABSTRACT_MODULE_H_ 6 #define SKY_ENGINE_CORE_APP_ABSTRACT_MODULE_H_
7 7
8 #include "core/dom/ContextLifecycleObserver.h" 8 #include "core/dom/ContextLifecycleObserver.h"
9 #include "core/dom/Document.h" 9 #include "core/dom/Document.h"
10 #include "core/events/EventTarget.h" 10 #include "core/events/EventTarget.h"
11 #include "wtf/RefCounted.h" 11 #include "wtf/RefCounted.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 class AbstractModule : public RefCounted<AbstractModule>, 15 class AbstractModule : public RefCounted<AbstractModule>,
16 public EventTargetWithInlineData, 16 public EventTargetWithInlineData,
17 public ContextLifecycleObserver { 17 public ContextLifecycleObserver {
18 DEFINE_WRAPPERTYPEINFO(); 18 DEFINE_WRAPPERTYPEINFO();
19 REFCOUNTED_EVENT_TARGET(AbstractModule); 19 REFCOUNTED_EVENT_TARGET(AbstractModule);
20 public: 20 public:
21 virtual ~AbstractModule(); 21 virtual ~AbstractModule();
22 22
23 Document* document() const { return document_.get(); } 23 Document* document() const { return document_.get(); }
24 const String& url() const { return url_; } 24 const String& url() const { return url_; }
25 25
26 protected: 26 protected:
27 AbstractModule(ExecutionContext*, Document*, const String& url); 27 AbstractModule(ExecutionContext*, PassRefPtr<Document>, const String& url);
28 28
29 private: 29 private:
30 ExecutionContext* executionContext() const override; 30 ExecutionContext* executionContext() const override;
31 31
32 RefPtr<Document> document_; 32 RefPtr<Document> document_;
33 String url_; 33 String url_;
34 }; 34 };
35 35
36 } // namespace blink 36 } // namespace blink
37 37
38 #endif // SKY_ENGINE_CORE_APP_ABSTRACT_MODULE_H_ 38 #endif // SKY_ENGINE_CORE_APP_ABSTRACT_MODULE_H_
OLDNEW
« no previous file with comments | « no previous file | sky/engine/core/app/AbstractModule.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698