| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "core/inspector/InspectedFrames.h" | 5 #include "core/inspector/InspectedFrames.h" |
| 6 | 6 |
| 7 #include "core/dom/Document.h" | 7 #include "core/dom/Document.h" |
| 8 #include "core/frame/LocalFrame.h" | 8 #include "core/frame/LocalFrame.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 } | 25 } |
| 26 | 26 |
| 27 bool InspectedFrames::contains(LocalFrame* frame) const | 27 bool InspectedFrames::contains(LocalFrame* frame) const |
| 28 { | 28 { |
| 29 return frame->instrumentingAgents() == m_root->instrumentingAgents(); | 29 return frame->instrumentingAgents() == m_root->instrumentingAgents(); |
| 30 } | 30 } |
| 31 | 31 |
| 32 LocalFrame* InspectedFrames::frameWithSecurityOrigin(const String& originRawStri
ng) | 32 LocalFrame* InspectedFrames::frameWithSecurityOrigin(const String& originRawStri
ng) |
| 33 { | 33 { |
| 34 for (LocalFrame* frame : *this) { | 34 for (LocalFrame* frame : *this) { |
| 35 if (frame->document()->securityOrigin()->toRawString() == originRawStrin
g) | 35 if (frame->document()->getSecurityOrigin()->toRawString() == originRawSt
ring) |
| 36 return frame; | 36 return frame; |
| 37 } | 37 } |
| 38 return nullptr; | 38 return nullptr; |
| 39 } | 39 } |
| 40 | 40 |
| 41 InspectedFrames::Iterator::Iterator(LocalFrame* root, LocalFrame* current) | 41 InspectedFrames::Iterator::Iterator(LocalFrame* root, LocalFrame* current) |
| 42 : m_root(root) | 42 : m_root(root) |
| 43 , m_current(current) | 43 , m_current(current) |
| 44 { | 44 { |
| 45 } | 45 } |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 { | 78 { |
| 79 return !(*this == other); | 79 return !(*this == other); |
| 80 } | 80 } |
| 81 | 81 |
| 82 DEFINE_TRACE(InspectedFrames) | 82 DEFINE_TRACE(InspectedFrames) |
| 83 { | 83 { |
| 84 visitor->trace(m_root); | 84 visitor->trace(m_root); |
| 85 } | 85 } |
| 86 | 86 |
| 87 } // namespace blink | 87 } // namespace blink |
| OLD | NEW |