| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "blimp/engine/browser/font_data_fetcher_impl.h" | 5 #include "blimp/engine/browser/font_data_fetcher_impl.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/memory/ptr_util.h" |
| 9 #include "base/task_runner_util.h" | 10 #include "base/task_runner_util.h" |
| 10 | 11 |
| 11 namespace blimp { | 12 namespace blimp { |
| 12 namespace engine { | 13 namespace engine { |
| 13 | 14 |
| 14 namespace { | 15 namespace { |
| 15 // This is a temporary implementation which return a empty SkStream. | 16 // This is a temporary implementation which return a empty SkStream. |
| 16 std::unique_ptr<SkStream> | 17 std::unique_ptr<SkStream> |
| 17 FetchFontStreamOnFileThread(const std::string& font_hash) { | 18 FetchFontStreamOnFileThread(const std::string& font_hash) { |
| 18 return base::MakeUnique<SkMemoryStream>(); | 19 return base::MakeUnique<SkMemoryStream>(); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 34 const std::string& font_hash, const FontResponseCallback& callback) const { | 35 const std::string& font_hash, const FontResponseCallback& callback) const { |
| 35 DCHECK(thread_checker_.CalledOnValidThread()); | 36 DCHECK(thread_checker_.CalledOnValidThread()); |
| 36 | 37 |
| 37 base::PostTaskAndReplyWithResult( | 38 base::PostTaskAndReplyWithResult( |
| 38 file_task_runner_.get(), FROM_HERE, | 39 file_task_runner_.get(), FROM_HERE, |
| 39 base::Bind(&FetchFontStreamOnFileThread, font_hash), callback); | 40 base::Bind(&FetchFontStreamOnFileThread, font_hash), callback); |
| 40 } | 41 } |
| 41 | 42 |
| 42 } // namespace engine | 43 } // namespace engine |
| 43 } // namespace blimp | 44 } // namespace blimp |
| OLD | NEW |