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

Unified Diff: apps/app_shim/extension_app_shim_handler_mac.h

Issue 17481002: Restructure ExtensionAppShimHandler testing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 043a4d5373ae2104d76a7d99043f2b2e02ec37de..8a4a88caa73eeb8c8c3f1c87ad47f7ba02623666 100644
--- a/apps/app_shim/extension_app_shim_handler_mac.h
+++ b/apps/app_shim/extension_app_shim_handler_mac.h
@@ -11,6 +11,7 @@
#include "apps/app_lifetime_monitor.h"
#include "apps/app_shim/app_shim_handler_mac.h"
#include "base/memory/scoped_ptr.h"
+#include "chrome/browser/extensions/shell_window_registry.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
@@ -20,6 +21,10 @@ namespace base {
class FilePath;
}
+namespace content {
+class WebContents;
+}
+
namespace extensions {
class Extension;
}
@@ -32,11 +37,24 @@ class ExtensionAppShimHandler : public AppShimHandler,
public content::NotificationObserver,
public AppLifetimeMonitor::Observer {
public:
- class ProfileManagerFacade {
+ class Delegate {
public:
- virtual ~ProfileManagerFacade() {}
+ virtual ~Delegate() {}
+
virtual bool ProfileExistsForPath(const base::FilePath& path);
virtual Profile* ProfileForPath(const base::FilePath& path);
+
+ virtual extensions::ShellWindowRegistry::ShellWindowList GetWindows(
+ Profile* profile, const std::string& extension_id);
+
+ virtual const extensions::Extension* GetExtension(
+ Profile* profile, const std::string& extension_id);
+ virtual content::WebContents* LaunchApp(
+ Profile* profile,
+ const extensions::Extension* extension);
+ virtual void LaunchShim(Profile* profile,
+ const extensions::Extension* extension);
+
};
ExtensionAppShimHandler();
@@ -62,15 +80,11 @@ class ExtensionAppShimHandler : public AppShimHandler,
HostMap;
// Exposed for testing.
- void set_profile_manager_facade(ProfileManagerFacade* profile_manager_facade);
+ void set_dependency_facade(Delegate* dependency_facade);
tapted 2013/06/21 04:30:47 dependency_facade -> delegate
jackhou1 2013/06/21 05:46:27 Done.
HostMap& hosts() { return hosts_; }
content::NotificationRegistrar& registrar() { return registrar_; }
private:
- virtual bool LaunchApp(Profile* profile,
- const std::string& app_id,
- AppShimLaunchType launch_type);
-
// Listen to the NOTIFICATION_EXTENSION_HOST_DESTROYED message to detect when
// an app closes. When that happens, call OnAppClosed on the relevant
// AppShimHandler::Host which causes the app shim process to quit.
@@ -79,7 +93,7 @@ class ExtensionAppShimHandler : public AppShimHandler,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
- scoped_ptr<ProfileManagerFacade> profile_manager_facade_;
+ scoped_ptr<Delegate> delegate_;
HostMap hosts_;
« no previous file with comments | « no previous file | apps/app_shim/extension_app_shim_handler_mac.cc » ('j') | apps/app_shim/extension_app_shim_handler_mac.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698