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

Side by Side Diff: Source/modules/presentation/Presentation.cpp

Issue 879423003: Move Location to DOMWindow (Closed) Base URL: svn://svn.chromium.org/blink/trunk
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 | Annotate | Revision Log
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 #include "config.h" 5 #include "config.h"
6 #include "modules/presentation/Presentation.h" 6 #include "modules/presentation/Presentation.h"
7 7
8 #include "bindings/core/v8/ScriptPromise.h" 8 #include "bindings/core/v8/ScriptPromise.h"
9 #include "bindings/core/v8/ScriptPromiseResolver.h" 9 #include "bindings/core/v8/ScriptPromiseResolver.h"
10 #include "bindings/core/v8/ScriptState.h" 10 #include "bindings/core/v8/ScriptState.h"
(...skipping 26 matching lines...) Expand all
37 return presentation; 37 return presentation;
38 } 38 }
39 39
40 const AtomicString& Presentation::interfaceName() const 40 const AtomicString& Presentation::interfaceName() const
41 { 41 {
42 return EventTargetNames::Presentation; 42 return EventTargetNames::Presentation;
43 } 43 }
44 44
45 ExecutionContext* Presentation::executionContext() const 45 ExecutionContext* Presentation::executionContext() const
46 { 46 {
47 if (!frame()) 47 if (!localFrame())
48 return nullptr; 48 return nullptr;
49 return frame()->document(); 49 return localFrame()->document();
50 } 50 }
51 51
52 void Presentation::trace(Visitor* visitor) 52 void Presentation::trace(Visitor* visitor)
53 { 53 {
54 visitor->trace(m_session); 54 visitor->trace(m_session);
55 RefCountedGarbageCollectedEventTargetWithInlineData<Presentation>::trace(vis itor); 55 RefCountedGarbageCollectedEventTargetWithInlineData<Presentation>::trace(vis itor);
56 DOMWindowProperty::trace(visitor); 56 DOMWindowProperty::trace(visitor);
57 } 57 }
58 58
59 PresentationSession* Presentation::session() const 59 PresentationSession* Presentation::session() const
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 dispatchEvent(AvailableChangeEvent::create(EventTypeNames::availablechange, available)); 124 dispatchEvent(AvailableChangeEvent::create(EventTypeNames::availablechange, available));
125 } 125 }
126 126
127 bool Presentation::isAvailableChangeWatched() const 127 bool Presentation::isAvailableChangeWatched() const
128 { 128 {
129 return hasEventListeners(EventTypeNames::availablechange); 129 return hasEventListeners(EventTypeNames::availablechange);
130 } 130 }
131 131
132 PresentationController* Presentation::presentationController() 132 PresentationController* Presentation::presentationController()
133 { 133 {
134 if (!frame()) 134 if (!localFrame())
135 return nullptr; 135 return nullptr;
136 return PresentationController::from(*frame()); 136 return PresentationController::from(*localFrame());
137 } 137 }
138 138
139 } // namespace blink 139 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698