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 "extensions/browser/mojo/stash_backend.h" | 5 #include "extensions/browser/mojo/stash_backend.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h" | 8 #include "mojo/public/cpp/bindings/strong_binding.h" |
9 #include "third_party/mojo/src/mojo/public/cpp/environment/async_waiter.h" | 9 #include "mojo/public/cpp/environment/async_waiter.h" |
10 | 10 |
11 namespace extensions { | 11 namespace extensions { |
12 namespace { | 12 namespace { |
13 | 13 |
14 // An implementation of StashService that forwards calls to a StashBackend. | 14 // An implementation of StashService that forwards calls to a StashBackend. |
15 class StashServiceImpl : public StashService { | 15 class StashServiceImpl : public StashService { |
16 public: | 16 public: |
17 StashServiceImpl(mojo::InterfaceRequest<StashService> request, | 17 StashServiceImpl(mojo::InterfaceRequest<StashService> request, |
18 base::WeakPtr<StashBackend> backend); | 18 base::WeakPtr<StashBackend> backend); |
19 ~StashServiceImpl() override; | 19 ~StashServiceImpl() override; |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 waiters_.clear(); | 158 waiters_.clear(); |
159 } | 159 } |
160 | 160 |
161 void StashBackend::StashEntry::OnHandleReady(MojoResult result) { | 161 void StashBackend::StashEntry::OnHandleReady(MojoResult result) { |
162 if (result != MOJO_RESULT_OK) | 162 if (result != MOJO_RESULT_OK) |
163 return; | 163 return; |
164 on_handle_readable_.Run(); | 164 on_handle_readable_.Run(); |
165 } | 165 } |
166 | 166 |
167 } // namespace extensions | 167 } // namespace extensions |
OLD | NEW |