Index: apps/app_shim/app_shim_handler_mac.h |
diff --git a/apps/app_shim/app_shim_handler_mac.h b/apps/app_shim/app_shim_handler_mac.h |
index 6a694c0a0a3107e88e106229af8cc7bf3d4be880..c0fc87ac47d438e112bddde320688d6084a52d28 100644 |
--- a/apps/app_shim/app_shim_handler_mac.h |
+++ b/apps/app_shim/app_shim_handler_mac.h |
@@ -7,6 +7,8 @@ |
#include <string> |
+class Profile; |
+ |
namespace apps { |
// Registrar, and interface for services that can handle interactions with OSX |
@@ -18,6 +20,10 @@ class AppShimHandler { |
// Invoked when the app is closed in the browser process. |
virtual void OnAppClosed() = 0; |
+ // Allows the handler to determine which app this host corresponds to. |
+ virtual Profile* profile() const = 0; |
tapted
2013/05/21 06:15:37
Since there is no corresponding data member at thi
jackhou1
2013/05/22 23:54:44
Done.
|
+ virtual const std::string& app_id() const = 0; |
tapted
2013/05/21 06:15:37
nit: Maybe drop the reference and just return std:
jackhou1
2013/05/22 23:54:44
Done.
|
+ |
protected: |
virtual ~Host() {} |
}; |
@@ -29,10 +35,14 @@ class AppShimHandler { |
// Remove a handler for an |app_mode_id|. |
static void RemoveHandler(const std::string& app_mode_id); |
- // Returns the handler registered for the given |app_mode_id|, or NULL if none |
- // is registered. |
+ // Returns the handler registered for the given |app_mode_id|, or the default |
+ // handler if none is registered, or NULL if there is no default handler. |
tapted
2013/05/21 06:15:37
nit: comment reads a bit funny. Maybe just drop th
jackhou1
2013/05/22 23:54:44
Done.
|
static AppShimHandler* GetForAppMode(const std::string& app_mode_id); |
+ // Sets the default handler to return when there is no app-specific handler. |
+ // Setting this to NULL removes the default handler. |
+ static void SetDefaultHandler(AppShimHandler* handler); |
+ |
// Invoked by the shim host when the shim process is launched. The handler |
// must return true if successful, or false to indicate back to the shim |
// process that it should close. |