| 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 CHROME_BROWSER_CHROMEOS_ARC_PRINT_ARC_PRINT_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_PRINT_ARC_PRINT_SERVICE_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_ARC_PRINT_ARC_PRINT_SERVICE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_ARC_PRINT_ARC_PRINT_SERVICE_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "components/arc/arc_service.h" | 9 #include "components/arc/arc_service.h" |
| 10 #include "components/arc/common/print.mojom.h" | 10 #include "components/arc/common/print.mojom.h" |
| 11 #include "components/arc/instance_holder.h" | 11 #include "components/arc/instance_holder.h" |
| 12 #include "mojo/public/cpp/bindings/binding.h" | 12 #include "mojo/public/cpp/bindings/binding.h" |
| 13 | 13 |
| 14 namespace arc { | 14 namespace arc { |
| 15 | 15 |
| 16 class ArcBridgeService; | 16 class ArcBridgeService; |
| 17 | 17 |
| 18 class ArcPrintService : public ArcService, | 18 class ArcPrintService : public ArcService, |
| 19 public InstanceHolder<mojom::PrintInstance>::Observer, | 19 public InstanceHolder<mojom::PrintInstance>::Observer, |
| 20 public mojom::PrintHost { | 20 public mojom::PrintHost { |
| 21 public: | 21 public: |
| 22 explicit ArcPrintService(ArcBridgeService* bridge_service); | 22 explicit ArcPrintService(ArcBridgeService* bridge_service); |
| 23 ~ArcPrintService() override; | 23 ~ArcPrintService() override; |
| 24 | 24 |
| 25 // ArcBridgeService::Observer overrides. | 25 // InstanceHolder<mojom::PrintInstance>::Observer: |
| 26 void OnInstanceReady() override; | 26 void OnInstanceReady() override; |
| 27 | 27 |
| 28 void Print(mojo::ScopedHandle pdf_data) override; | 28 void Print(mojo::ScopedHandle pdf_data) override; |
| 29 | 29 |
| 30 private: | 30 private: |
| 31 mojo::Binding<mojom::PrintHost> binding_; | 31 mojo::Binding<mojom::PrintHost> binding_; |
| 32 | 32 |
| 33 DISALLOW_COPY_AND_ASSIGN(ArcPrintService); | 33 DISALLOW_COPY_AND_ASSIGN(ArcPrintService); |
| 34 }; | 34 }; |
| 35 | 35 |
| 36 } // namespace arc | 36 } // namespace arc |
| 37 | 37 |
| 38 #endif // CHROME_BROWSER_CHROMEOS_ARC_PRINT_ARC_PRINT_SERVICE_H_ | 38 #endif // CHROME_BROWSER_CHROMEOS_ARC_PRINT_ARC_PRINT_SERVICE_H_ |
| OLD | NEW |