7f70fce9ea54409bec9b9cc109960ad6b35645dd
[platform/framework/web/crosswalk.git] / src / xwalk / application / browser / application_system_linux.cc
1 // Copyright (c) 2013 Intel Corporation. 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 "xwalk/application/browser/application_system_linux.h"
6
7 #include "dbus/bus.h"
8 #include "xwalk/application/browser/application_service_provider_linux.h"
9 #include "xwalk/dbus/dbus_manager.h"
10 #include "xwalk/runtime/browser/xwalk_runner.h"
11
12 namespace xwalk {
13 namespace application {
14
15 ApplicationSystemLinux::ApplicationSystemLinux(RuntimeContext* runtime_context)
16     : ApplicationSystem(runtime_context) {
17 #if defined(SHARED_PROCESS_MODE)
18     service_provider_.reset(
19         new ApplicationServiceProviderLinux(application_service(),
20                                             dbus_manager().session_bus()));
21 #endif
22 }
23
24 ApplicationSystemLinux::~ApplicationSystemLinux() {}
25
26 DBusManager& ApplicationSystemLinux::dbus_manager() {
27   if (!dbus_manager_)
28     dbus_manager_.reset(new DBusManager());
29   return *dbus_manager_.get();
30 }
31
32 ApplicationServiceProviderLinux* ApplicationSystemLinux::service_provider() {
33   return service_provider_.get();
34 }
35
36 }  // namespace application
37 }  // namespace xwalk