| 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 #ifndef COMPONENTS_WEB_RESTRICTIONS_BROWSER_WEB_RESTRICTIONS_MOJO_IMPLEMENTATION
_H_ | 5 #ifndef COMPONENTS_WEB_RESTRICTIONS_BROWSER_WEB_RESTRICTIONS_MOJO_IMPLEMENTATION
_H_ |
| 6 #define COMPONENTS_WEB_RESTRICTIONS_BROWSER_WEB_RESTRICTIONS_MOJO_IMPLEMENTATION
_H_ | 6 #define COMPONENTS_WEB_RESTRICTIONS_BROWSER_WEB_RESTRICTIONS_MOJO_IMPLEMENTATION
_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "components/web_restrictions/interfaces/web_restrictions.mojom.h" | 11 #include "components/web_restrictions/interfaces/web_restrictions.mojom.h" |
| 12 | 12 |
| 13 namespace service_manager { |
| 14 struct BindSourceInfo; |
| 15 } |
| 16 |
| 13 namespace web_restrictions { | 17 namespace web_restrictions { |
| 14 | 18 |
| 15 class WebRestrictionsClient; | 19 class WebRestrictionsClient; |
| 16 | 20 |
| 17 class WebRestrictionsMojoImplementation : public mojom::WebRestrictions { | 21 class WebRestrictionsMojoImplementation : public mojom::WebRestrictions { |
| 18 public: | 22 public: |
| 19 explicit WebRestrictionsMojoImplementation(WebRestrictionsClient* client); | 23 explicit WebRestrictionsMojoImplementation(WebRestrictionsClient* client); |
| 20 ~WebRestrictionsMojoImplementation() override; | 24 ~WebRestrictionsMojoImplementation() override; |
| 21 | 25 |
| 22 static void Create(WebRestrictionsClient* client, | 26 static void Create(WebRestrictionsClient* client, |
| 23 mojo::InterfaceRequest<mojom::WebRestrictions> request); | 27 const service_manager::BindSourceInfo& source_info, |
| 28 mojom::WebRestrictionsRequest request); |
| 24 | 29 |
| 25 private: | 30 private: |
| 26 void GetResult(const std::string& url, | 31 void GetResult(const std::string& url, |
| 27 const GetResultCallback& callback) override; | 32 const GetResultCallback& callback) override; |
| 28 void RequestPermission(const std::string& url, | 33 void RequestPermission(const std::string& url, |
| 29 const RequestPermissionCallback& callback) override; | 34 const RequestPermissionCallback& callback) override; |
| 30 | 35 |
| 31 WebRestrictionsClient* web_restrictions_client_; | 36 WebRestrictionsClient* web_restrictions_client_; |
| 32 }; | 37 }; |
| 33 | 38 |
| 34 } // namespace web_restrictions | 39 } // namespace web_restrictions |
| 35 #endif // COMPONENTS_WEB_RESTRICTIONS_BROWSER_WEB_RESTRICTIONS_MOJO_IMPLEMENTAT
ION_H_ | 40 #endif // COMPONENTS_WEB_RESTRICTIONS_BROWSER_WEB_RESTRICTIONS_MOJO_IMPLEMENTAT
ION_H_ |
| OLD | NEW |