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 "content/public/browser/browser_context.h" | |
Luis Héctor Chávez
2016/11/23 17:42:09
Same here, drop and forward-declare BrowserContext
Sergey Poromov
2016/11/23 18:05:56
Done.
| |
14 #include "mojo/public/cpp/bindings/binding.h" | 15 #include "mojo/public/cpp/bindings/binding.h" |
15 | 16 |
17 using content::BrowserContext; | |
Luis Héctor Chávez
2016/11/23 17:42:09
Avoid global "using" in .h files at all costs.
Sergey Poromov
2016/11/23 18:05:57
Done.
| |
18 | |
16 namespace arc { | 19 namespace arc { |
17 | 20 |
18 class ArcBridgeService; | 21 class ArcBridgeService; |
19 | 22 |
20 class ArcKioskBridge : public ArcService, | 23 class ArcKioskBridge : public ArcService, |
21 public InstanceHolder<mojom::KioskInstance>::Observer, | 24 public InstanceHolder<mojom::KioskInstance>::Observer, |
22 public mojom::KioskHost { | 25 public mojom::KioskHost { |
23 public: | 26 public: |
24 explicit ArcKioskBridge(ArcBridgeService* bridge_service); | 27 explicit ArcKioskBridge(ArcBridgeService* bridge_service, |
28 BrowserContext* browser_context); | |
25 ~ArcKioskBridge() override; | 29 ~ArcKioskBridge() override; |
26 | 30 |
27 // InstanceHolder<mojom::KioskInstance>::Observer overrides. | 31 // InstanceHolder<mojom::KioskInstance>::Observer overrides. |
28 void OnInstanceReady() override; | 32 void OnInstanceReady() override; |
29 | 33 |
30 // mojom::KioskHost overrides. | 34 // mojom::KioskHost overrides. |
31 void OnMaintenanceSessionCreated(int32_t session_id) override; | 35 void OnMaintenanceSessionCreated(int32_t session_id) override; |
32 void OnMaintenanceSessionFinished(int32_t session_id, bool success) override; | 36 void OnMaintenanceSessionFinished(int32_t session_id, bool success) override; |
33 | 37 |
34 private: | 38 private: |
35 mojo::Binding<mojom::KioskHost> binding_; | 39 mojo::Binding<mojom::KioskHost> binding_; |
36 | 40 |
41 BrowserContext* browser_context_; | |
Luis Héctor Chávez
2016/11/23 17:42:09
nit: content::BrowserContext* const browser_contex
Sergey Poromov
2016/11/23 18:05:57
Done.
| |
42 | |
37 DISALLOW_COPY_AND_ASSIGN(ArcKioskBridge); | 43 DISALLOW_COPY_AND_ASSIGN(ArcKioskBridge); |
38 }; | 44 }; |
39 | 45 |
40 } // namespace arc | 46 } // namespace arc |
41 | 47 |
42 #endif // COMPONENTS_ARC_KIOSK_ARC_KIOSK_BRIDGE_H_ | 48 #endif // COMPONENTS_ARC_KIOSK_ARC_KIOSK_BRIDGE_H_ |
OLD | NEW |