OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "config.h" |
| 6 #include "modules/presentation/Presentation.h" |
| 7 |
| 8 #include "core/dom/Document.h" |
| 9 #include "core/frame/LocalFrame.h" |
| 10 #include "modules/EventTargetModules.h" |
| 11 |
| 12 namespace blink { |
| 13 |
| 14 Presentation::Presentation(LocalFrame* frame) |
| 15 : DOMWindowProperty(frame) |
| 16 { |
| 17 ScriptWrappable::init(this); |
| 18 } |
| 19 |
| 20 Presentation::~Presentation() |
| 21 { |
| 22 } |
| 23 |
| 24 // static |
| 25 Presentation* Presentation::create(LocalFrame* frame) |
| 26 { |
| 27 return new Presentation(frame); |
| 28 } |
| 29 |
| 30 bool Presentation::displayAvailable() const |
| 31 { |
| 32 return true; |
| 33 } |
| 34 |
| 35 const WTF::AtomicString& Presentation::interfaceName() const |
| 36 { |
| 37 return EventTargetNames::Presentation; |
| 38 } |
| 39 |
| 40 ExecutionContext* Presentation::executionContext() const |
| 41 { |
| 42 if (!frame()) |
| 43 return 0; |
| 44 return frame()->document(); |
| 45 } |
| 46 |
| 47 void Presentation::trace(Visitor* visitor) |
| 48 { |
| 49 EventTargetWithInlineData::trace(visitor); |
| 50 } |
| 51 |
| 52 } // namespace blink |
OLD | NEW |