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.
5 #ifndef XWALK_APPLICATION_BROWSER_LINUX_RUNNING_APPLICATION_OBJECT_H_
6 #define XWALK_APPLICATION_BROWSER_LINUX_RUNNING_APPLICATION_OBJECT_H_
9 #include "base/memory/ref_counted.h"
10 #include "xwalk/dbus/object_manager_adaptor.h"
17 namespace application {
21 class RunningApplicationObject : public dbus::ManagedObject {
23 RunningApplicationObject(scoped_refptr<dbus::Bus> bus,
24 const std::string& app_id,
25 const std::string& launcher_name,
26 Application* application);
28 ~RunningApplicationObject();
31 void TerminateApplication();
33 void OnExported(const std::string& interface_name,
34 const std::string& method_name,
37 void OnTerminate(dbus::MethodCall* method_call,
38 dbus::ExportedObject::ResponseSender response_sender);
40 void OnNameOwnerChanged(const std::string& service_owner);
42 void OnLauncherDisappeared();
44 scoped_refptr<dbus::Bus> bus_;
45 std::string launcher_name_;
46 Application* application_;
47 bool watching_launcher_;
50 } // namespace application
53 #endif // XWALK_APPLICATION_BROWSER_LINUX_RUNNING_APPLICATION_OBJECT_H_