1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "components/arc/session/arc_session.h"
6
7 #include "components/arc/session/arc_session_impl.h"
8
9 namespace arc {
10
11 ArcSession::ArcSession() = default;
12 ArcSession::~ArcSession() = default;
13
AddObserver(Observer * observer)14 void ArcSession::AddObserver(Observer* observer) {
15 observer_list_.AddObserver(observer);
16 }
17
RemoveObserver(Observer * observer)18 void ArcSession::RemoveObserver(Observer* observer) {
19 observer_list_.RemoveObserver(observer);
20 }
21
22 // static
Create(ArcBridgeService * arc_bridge_service,ash::DefaultScaleFactorRetriever * retriever,version_info::Channel channel,chromeos::SchedulerConfigurationManagerBase * scheduler_configuration_manager,AdbSideloadingAvailabilityDelegate * adb_sideloading_availability_delegate)23 std::unique_ptr<ArcSession> ArcSession::Create(
24 ArcBridgeService* arc_bridge_service,
25 ash::DefaultScaleFactorRetriever* retriever,
26 version_info::Channel channel,
27 chromeos::SchedulerConfigurationManagerBase*
28 scheduler_configuration_manager,
29 AdbSideloadingAvailabilityDelegate* adb_sideloading_availability_delegate) {
30 return std::make_unique<ArcSessionImpl>(
31 ArcSessionImpl::CreateDelegate(arc_bridge_service, retriever, channel),
32 scheduler_configuration_manager, adb_sideloading_availability_delegate);
33 }
34
35 } // namespace arc
36