| 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_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_ |
| OLD | NEW |