| 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 #include "config.h" | 5 #include "config.h" |
| 6 #include "modules/presentation/NavigatorPresentation.h" | 6 #include "modules/presentation/NavigatorPresentation.h" |
| 7 | 7 |
| 8 #include "core/frame/Navigator.h" | 8 #include "core/frame/Navigator.h" |
| 9 #include "modules/presentation/Presentation.h" | 9 #include "modules/presentation/Presentation.h" |
| 10 | 10 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 return *supplement; | 35 return *supplement; |
| 36 } | 36 } |
| 37 | 37 |
| 38 // static | 38 // static |
| 39 Presentation* NavigatorPresentation::presentation(Navigator& navigator) | 39 Presentation* NavigatorPresentation::presentation(Navigator& navigator) |
| 40 { | 40 { |
| 41 NavigatorPresentation& self = NavigatorPresentation::from(navigator); | 41 NavigatorPresentation& self = NavigatorPresentation::from(navigator); |
| 42 if (!self.m_presentation) { | 42 if (!self.m_presentation) { |
| 43 if (!navigator.frame()) | 43 if (!navigator.frame()) |
| 44 return nullptr; | 44 return nullptr; |
| 45 self.m_presentation = Presentation::create(navigator.frame()); | 45 self.m_presentation = Presentation::create(navigator.localFrame()); |
| 46 } | 46 } |
| 47 return self.m_presentation.get(); | 47 return self.m_presentation.get(); |
| 48 } | 48 } |
| 49 | 49 |
| 50 void NavigatorPresentation::trace(Visitor* visitor) | 50 void NavigatorPresentation::trace(Visitor* visitor) |
| 51 { | 51 { |
| 52 visitor->trace(m_presentation); | 52 visitor->trace(m_presentation); |
| 53 WillBeHeapSupplement<Navigator>::trace(visitor); | 53 WillBeHeapSupplement<Navigator>::trace(visitor); |
| 54 } | 54 } |
| 55 | 55 |
| 56 } // namespace blink | 56 } // namespace blink |
| OLD | NEW |