| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 MOJO_SHELL_DBUS_APPLICATION_LOADER_LINUX_H_ | 5 #ifndef MOJO_SHELL_DBUS_APPLICATION_LOADER_LINUX_H_ |
| 6 #define MOJO_SHELL_DBUS_APPLICATION_LOADER_LINUX_H_ | 6 #define MOJO_SHELL_DBUS_APPLICATION_LOADER_LINUX_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 // dbus:org.chromium.EchoService/org/chromium/MojoImpl | 57 // dbus:org.chromium.EchoService/org/chromium/MojoImpl |
| 58 // | 58 // |
| 59 // This will tell DBusApplicationLoader to reach out to a service with | 59 // This will tell DBusApplicationLoader to reach out to a service with |
| 60 // the name "org.chromium.EchoService" and invoke the method | 60 // the name "org.chromium.EchoService" and invoke the method |
| 61 // "org.chromium.Mojo.ConnectChannel" on the object exported at | 61 // "org.chromium.Mojo.ConnectChannel" on the object exported at |
| 62 // "/org/chromium/MojoImpl". | 62 // "/org/chromium/MojoImpl". |
| 63 virtual void Load(ApplicationManager* manager, | 63 virtual void Load(ApplicationManager* manager, |
| 64 const GURL& url, | 64 const GURL& url, |
| 65 scoped_refptr<LoadCallbacks> callbacks) OVERRIDE; | 65 scoped_refptr<LoadCallbacks> callbacks) OVERRIDE; |
| 66 | 66 |
| 67 virtual void OnServiceError(ApplicationManager* manager, | 67 virtual void OnApplicationError(ApplicationManager* manager, |
| 68 const GURL& url) OVERRIDE; | 68 const GURL& url) OVERRIDE; |
| 69 | 69 |
| 70 private: | 70 private: |
| 71 class LoadContext; | 71 class LoadContext; |
| 72 | 72 |
| 73 // Tosses out connection-related state to service at given URL. | 73 // Tosses out connection-related state to service at given URL. |
| 74 void ForgetService(const GURL& url); | 74 void ForgetService(const GURL& url); |
| 75 | 75 |
| 76 Context* const context_; | 76 Context* const context_; |
| 77 scoped_refptr<dbus::Bus> bus_; | 77 scoped_refptr<dbus::Bus> bus_; |
| 78 | 78 |
| 79 typedef std::map<GURL, LoadContext*> LoadContextMap; | 79 typedef std::map<GURL, LoadContext*> LoadContextMap; |
| 80 LoadContextMap url_to_load_context_; | 80 LoadContextMap url_to_load_context_; |
| 81 | 81 |
| 82 DISALLOW_COPY_AND_ASSIGN(DBusApplicationLoader); | 82 DISALLOW_COPY_AND_ASSIGN(DBusApplicationLoader); |
| 83 }; | 83 }; |
| 84 | 84 |
| 85 } // namespace shell | 85 } // namespace shell |
| 86 } // namespace mojo | 86 } // namespace mojo |
| 87 | 87 |
| 88 #endif // MOJO_SHELL_DBUS_APPLICATION_LOADER_LINUX_H_ | 88 #endif // MOJO_SHELL_DBUS_APPLICATION_LOADER_LINUX_H_ |
| OLD | NEW |