Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Side by Side Diff: content/browser/hyphenation/hyphenation_impl.cc

Issue 2522553003: Mojo C++ bindings: switch WebKit mojom targets to use STL/WTF types. (Closed)
Patch Set: . Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/browser/hyphenation/hyphenation_impl.h ('k') | content/browser/mime_registry_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(blink::mojom::HyphenationRequest request) {
64 mojo::MakeStrongBinding(base::MakeUnique<HyphenationImpl>(), 64 mojo::MakeStrongBinding(base::MakeUnique<HyphenationImpl>(),
65 std::move(request)); 65 std::move(request));
66 } 66 }
67 67
68 void HyphenationImpl::OpenDictionary(const mojo::String& locale, 68 void HyphenationImpl::OpenDictionary(const std::string& locale,
69 const OpenDictionaryCallback& callback) { 69 const OpenDictionaryCallback& callback) {
70 mojo::ScopedHandle handle; 70 mojo::ScopedHandle handle;
71 if (IsValidLocale(locale)) { 71 if (IsValidLocale(locale)) {
72 base::File& file = GetDictionaryFile(locale); 72 base::File& file = GetDictionaryFile(locale);
73 if (file.IsValid()) 73 if (file.IsValid())
74 handle = mojo::WrapPlatformFile(file.Duplicate().TakePlatformFile()); 74 handle = mojo::WrapPlatformFile(file.Duplicate().TakePlatformFile());
75 } 75 }
76 callback.Run(std::move(handle)); 76 callback.Run(std::move(handle));
77 } 77 }
78 78
79 } // namespace hyphenation 79 } // namespace hyphenation
OLDNEW
« no previous file with comments | « content/browser/hyphenation/hyphenation_impl.h ('k') | content/browser/mime_registry_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698