Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(385)

Unified Diff: apps/app_shim/extension_app_shim_handler_mac.h

Issue 14579006: Start app shim when app launched. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comment Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: apps/app_shim/extension_app_shim_handler_mac.h
diff --git a/apps/app_shim/extension_app_shim_handler_mac.h b/apps/app_shim/extension_app_shim_handler_mac.h
index ea9a8c7eeea8eb945dd11429f242b006dd21777b..2b10c274cac1f311c6ec23b00022b667f66dbb38 100644
--- a/apps/app_shim/extension_app_shim_handler_mac.h
+++ b/apps/app_shim/extension_app_shim_handler_mac.h
@@ -14,6 +14,10 @@
class Profile;
+namespace extensions {
+class Extension;
+}
+
namespace apps {
// This app shim handler that handles events for app shims that correspond to an
@@ -25,7 +29,7 @@ class ExtensionAppShimHandler : public AppShimHandler,
virtual ~ExtensionAppShimHandler();
// AppShimHandler overrides:
- virtual bool OnShimLaunch(Host* host) OVERRIDE;
+ virtual bool OnShimLaunch(Host* host, bool launch_now) OVERRIDE;
virtual void OnShimClose(Host* host) OVERRIDE;
virtual void OnShimFocus(Host* host) OVERRIDE;
@@ -38,7 +42,9 @@ class ExtensionAppShimHandler : public AppShimHandler,
content::NotificationRegistrar& registrar() { return registrar_; }
private:
- virtual bool LaunchApp(Profile* profile, const std::string& app_id);
+ virtual bool LaunchApp(Profile* profile,
+ const std::string& app_id,
+ bool launch_now);
// Listen to the NOTIFICATION_EXTENSION_HOST_DESTROYED message to detect when
// an app closes. When that happens, call OnAppClosed on the relevant
@@ -48,6 +54,8 @@ class ExtensionAppShimHandler : public AppShimHandler,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
+ void StartShim(Profile* profile, const extensions::Extension* extension);
+
void CloseShim(Profile* profile, const std::string& app_id);
HostMap hosts_;

Powered by Google App Engine
This is Rietveld 408576698