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 "components/web_restrictions/browser/web_restrictions_mojo_implementati
on.h" | 5 #include "components/web_restrictions/browser/web_restrictions_mojo_implementati
on.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/memory/ptr_util.h" |
10 #include "components/web_restrictions/browser/web_restrictions_client.h" | 11 #include "components/web_restrictions/browser/web_restrictions_client.h" |
11 #include "mojo/public/cpp/bindings/strong_binding.h" | 12 #include "mojo/public/cpp/bindings/strong_binding.h" |
12 | 13 |
13 namespace web_restrictions { | 14 namespace web_restrictions { |
14 | 15 |
15 namespace { | 16 namespace { |
16 | 17 |
17 void ClientRequestPermissionCallback( | 18 void ClientRequestPermissionCallback( |
18 const mojom::WebRestrictions::RequestPermissionCallback& callback, | 19 const mojom::WebRestrictions::RequestPermissionCallback& callback, |
19 bool result) { | 20 bool result) { |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 } | 61 } |
61 | 62 |
62 void WebRestrictionsMojoImplementation::RequestPermission( | 63 void WebRestrictionsMojoImplementation::RequestPermission( |
63 const std::string& url, | 64 const std::string& url, |
64 const mojom::WebRestrictions::RequestPermissionCallback& callback) { | 65 const mojom::WebRestrictions::RequestPermissionCallback& callback) { |
65 web_restrictions_client_->RequestPermission( | 66 web_restrictions_client_->RequestPermission( |
66 url, base::Bind(&ClientRequestPermissionCallback, callback)); | 67 url, base::Bind(&ClientRequestPermissionCallback, callback)); |
67 } | 68 } |
68 | 69 |
69 } // namespace web_restrictions | 70 } // namespace web_restrictions |
OLD | NEW |