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 "content/browser/hyphenation/hyphenation_impl.h" | 5 #include "content/browser/hyphenation/hyphenation_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 | 53 |
54 } // namespace | 54 } // namespace |
55 | 55 |
56 namespace hyphenation { | 56 namespace hyphenation { |
57 | 57 |
58 HyphenationImpl::HyphenationImpl() {} | 58 HyphenationImpl::HyphenationImpl() {} |
59 | 59 |
60 HyphenationImpl::~HyphenationImpl() {} | 60 HyphenationImpl::~HyphenationImpl() {} |
61 | 61 |
62 // static | 62 // static |
63 void HyphenationImpl::Create(blink::mojom::HyphenationRequest request) { | 63 void HyphenationImpl::Create(const service_manager::BindSourceInfo& source_info, |
| 64 blink::mojom::HyphenationRequest request) { |
64 mojo::MakeStrongBinding(base::MakeUnique<HyphenationImpl>(), | 65 mojo::MakeStrongBinding(base::MakeUnique<HyphenationImpl>(), |
65 std::move(request)); | 66 std::move(request)); |
66 } | 67 } |
67 | 68 |
68 void HyphenationImpl::OpenDictionary(const std::string& locale, | 69 void HyphenationImpl::OpenDictionary(const std::string& locale, |
69 const OpenDictionaryCallback& callback) { | 70 const OpenDictionaryCallback& callback) { |
70 if (IsValidLocale(locale)) | 71 if (IsValidLocale(locale)) |
71 callback.Run(GetDictionaryFile(locale)); | 72 callback.Run(GetDictionaryFile(locale)); |
72 else | 73 else |
73 callback.Run(base::File()); | 74 callback.Run(base::File()); |
74 } | 75 } |
75 | 76 |
76 } // namespace hyphenation | 77 } // namespace hyphenation |
OLD | NEW |