Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(154)

Side by Side Diff: components/arc/kiosk/arc_kiosk_bridge.cc

Issue 2524673003: arc: Stop/start ARC++ kiosk app when maintenance session started/finished. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/arc/kiosk/arc_kiosk_bridge.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/arc/kiosk/arc_kiosk_bridge.h" 5 #include "components/arc/kiosk/arc_kiosk_bridge.h"
6 6
7 #include "components/arc/arc_bridge_service.h" 7 #include "components/arc/arc_bridge_service.h"
8 #include "components/arc/arc_service_manager.h"
9 8
10 namespace arc { 9 namespace arc {
11 10
12 ArcKioskBridge::ArcKioskBridge(ArcBridgeService* bridge_service) 11 ArcKioskBridge::ArcKioskBridge(ArcBridgeService* bridge_service,
13 : ArcService(bridge_service), binding_(this) { 12 Delegate* delegate)
13 : ArcService(bridge_service), binding_(this), delegate_(delegate) {
14 DCHECK(delegate_);
14 arc_bridge_service()->kiosk()->AddObserver(this); 15 arc_bridge_service()->kiosk()->AddObserver(this);
15 } 16 }
16 17
17 ArcKioskBridge::~ArcKioskBridge() { 18 ArcKioskBridge::~ArcKioskBridge() {
18 arc_bridge_service()->kiosk()->RemoveObserver(this); 19 arc_bridge_service()->kiosk()->RemoveObserver(this);
19 } 20 }
20 21
21 void ArcKioskBridge::OnInstanceReady() { 22 void ArcKioskBridge::OnInstanceReady() {
22 mojom::KioskInstance* kiosk_instance = 23 mojom::KioskInstance* kiosk_instance =
23 arc_bridge_service()->kiosk()->GetInstanceForMethod("Init"); 24 arc_bridge_service()->kiosk()->GetInstanceForMethod("Init");
24 DCHECK(kiosk_instance); 25 DCHECK(kiosk_instance);
25 kiosk_instance->Init(binding_.CreateInterfacePtrAndBind()); 26 kiosk_instance->Init(binding_.CreateInterfacePtrAndBind());
26 } 27 }
27 28
28 void ArcKioskBridge::OnMaintenanceSessionCreated(int32_t session_id) { 29 void ArcKioskBridge::OnMaintenanceSessionCreated(int32_t session_id) {
30 delegate_->OnMaintenanceSessionCreated();
29 // TODO(poromov@) Show appropriate splash screen. 31 // TODO(poromov@) Show appropriate splash screen.
30 } 32 }
31 33
32 void ArcKioskBridge::OnMaintenanceSessionFinished(int32_t session_id, 34 void ArcKioskBridge::OnMaintenanceSessionFinished(int32_t session_id,
33 bool success) { 35 bool success) {
34 // TODO(poromov@) Start kiosk app. 36 delegate_->OnMaintenanceSessionFinished();
35 } 37 }
36 38
37 } // namespace arc 39 } // namespace arc
OLDNEW
« no previous file with comments | « components/arc/kiosk/arc_kiosk_bridge.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698