| 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_ARC_KIOSK_ARC_KIOSK_BRIDGE_H_ | 5 #ifndef COMPONENTS_ARC_KIOSK_ARC_KIOSK_BRIDGE_H_ |
| 6 #define COMPONENTS_ARC_KIOSK_ARC_KIOSK_BRIDGE_H_ | 6 #define COMPONENTS_ARC_KIOSK_ARC_KIOSK_BRIDGE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "components/arc/arc_service.h" | 11 #include "components/arc/arc_service.h" |
| 12 #include "components/arc/common/kiosk.mojom.h" | 12 #include "components/arc/common/kiosk.mojom.h" |
| 13 #include "components/arc/instance_holder.h" | 13 #include "components/arc/instance_holder.h" |
| 14 #include "mojo/public/cpp/bindings/binding.h" | 14 #include "mojo/public/cpp/bindings/binding.h" |
| 15 | 15 |
| 16 namespace content { |
| 17 class BrowserContext; |
| 18 } |
| 19 |
| 16 namespace arc { | 20 namespace arc { |
| 17 | 21 |
| 18 class ArcBridgeService; | 22 class ArcBridgeService; |
| 19 | 23 |
| 20 class ArcKioskBridge : public ArcService, | 24 class ArcKioskBridge : public ArcService, |
| 21 public InstanceHolder<mojom::KioskInstance>::Observer, | 25 public InstanceHolder<mojom::KioskInstance>::Observer, |
| 22 public mojom::KioskHost { | 26 public mojom::KioskHost { |
| 23 public: | 27 public: |
| 24 explicit ArcKioskBridge(ArcBridgeService* bridge_service); | 28 explicit ArcKioskBridge(ArcBridgeService* bridge_service, |
| 29 content::BrowserContext* browser_context); |
| 25 ~ArcKioskBridge() override; | 30 ~ArcKioskBridge() override; |
| 26 | 31 |
| 27 // InstanceHolder<mojom::KioskInstance>::Observer overrides. | 32 // InstanceHolder<mojom::KioskInstance>::Observer overrides. |
| 28 void OnInstanceReady() override; | 33 void OnInstanceReady() override; |
| 29 | 34 |
| 30 // mojom::KioskHost overrides. | 35 // mojom::KioskHost overrides. |
| 31 void OnMaintenanceSessionCreated(int32_t session_id) override; | 36 void OnMaintenanceSessionCreated(int32_t session_id) override; |
| 32 void OnMaintenanceSessionFinished(int32_t session_id, bool success) override; | 37 void OnMaintenanceSessionFinished(int32_t session_id, bool success) override; |
| 33 | 38 |
| 34 private: | 39 private: |
| 35 mojo::Binding<mojom::KioskHost> binding_; | 40 mojo::Binding<mojom::KioskHost> binding_; |
| 36 | 41 |
| 42 content::BrowserContext* const browser_context_; |
| 43 |
| 37 DISALLOW_COPY_AND_ASSIGN(ArcKioskBridge); | 44 DISALLOW_COPY_AND_ASSIGN(ArcKioskBridge); |
| 38 }; | 45 }; |
| 39 | 46 |
| 40 } // namespace arc | 47 } // namespace arc |
| 41 | 48 |
| 42 #endif // COMPONENTS_ARC_KIOSK_ARC_KIOSK_BRIDGE_H_ | 49 #endif // COMPONENTS_ARC_KIOSK_ARC_KIOSK_BRIDGE_H_ |
| OLD | NEW |