| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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/document_metadata/CopylessPasteServer.h" | 5 #include "modules/document_metadata/CopylessPasteServer.h" |
| 6 | 6 |
| 7 #include "core/frame/LocalFrame.h" | 7 #include "core/frame/LocalFrame.h" |
| 8 #include "modules/document_metadata/CopylessPasteExtractor.h" | 8 #include "modules/document_metadata/CopylessPasteExtractor.h" |
| 9 #include "mojo/public/cpp/bindings/strong_binding.h" | 9 #include "mojo/public/cpp/bindings/strong_binding.h" |
| 10 | 10 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 // associated with frame lifetime. | 21 // associated with frame lifetime. |
| 22 mojo::MakeStrongBinding(WTF::MakeUnique<CopylessPasteServer>(*frame), | 22 mojo::MakeStrongBinding(WTF::MakeUnique<CopylessPasteServer>(*frame), |
| 23 std::move(request)); | 23 std::move(request)); |
| 24 } | 24 } |
| 25 | 25 |
| 26 void CopylessPasteServer::GetEntities(const GetEntitiesCallback& callback) { | 26 void CopylessPasteServer::GetEntities(const GetEntitiesCallback& callback) { |
| 27 if (!frame_ || !frame_->GetDocument()) { | 27 if (!frame_ || !frame_->GetDocument()) { |
| 28 callback.Run(nullptr); | 28 callback.Run(nullptr); |
| 29 return; | 29 return; |
| 30 } | 30 } |
| 31 // TODO(wychen): connect with CopylessPasteExtractor::extract() like: | 31 callback.Run(CopylessPasteExtractor::extract(*frame_->GetDocument())); |
| 32 // callback.Run(CopylessPasteExtractor::extract(*m_frame->document())); | |
| 33 callback.Run(nullptr); | |
| 34 } | 32 } |
| 35 | 33 |
| 36 } // namespace blink | 34 } // namespace blink |
| OLD | NEW |