| 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 "modules/presentation/Presentation.h" | 5 #include "modules/presentation/Presentation.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 #include "core/frame/Settings.h" | 9 #include "core/frame/Settings.h" |
| 10 #include "modules/presentation/PresentationController.h" | 10 #include "modules/presentation/PresentationController.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 PresentationController* controller = PresentationController::from(*frame()); | 45 PresentationController* controller = PresentationController::from(*frame()); |
| 46 if (!controller) | 46 if (!controller) |
| 47 return; | 47 return; |
| 48 controller->setDefaultRequestUrl(request ? request->url() : KURL()); | 48 controller->setDefaultRequestUrl(request ? request->url() : KURL()); |
| 49 } | 49 } |
| 50 | 50 |
| 51 PresentationReceiver* Presentation::receiver() { | 51 PresentationReceiver* Presentation::receiver() { |
| 52 if (!frame() || !frame()->settings()) | 52 if (!frame() || !frame()->settings()) |
| 53 return nullptr; | 53 return nullptr; |
| 54 | 54 |
| 55 if (!frame()->settings()->presentationReceiver()) | 55 if (!frame()->settings()->getPresentationReceiver()) |
| 56 return nullptr; | 56 return nullptr; |
| 57 | 57 |
| 58 if (!m_receiver) { | 58 if (!m_receiver) { |
| 59 PresentationController* controller = PresentationController::from(*frame()); | 59 PresentationController* controller = PresentationController::from(*frame()); |
| 60 auto* client = controller ? controller->client() : nullptr; | 60 auto* client = controller ? controller->client() : nullptr; |
| 61 m_receiver = new PresentationReceiver(frame(), client); | 61 m_receiver = new PresentationReceiver(frame(), client); |
| 62 } | 62 } |
| 63 | 63 |
| 64 return m_receiver; | 64 return m_receiver; |
| 65 } | 65 } |
| 66 | 66 |
| 67 } // namespace blink | 67 } // namespace blink |
| OLD | NEW |