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

Unified Diff: athena/extensions/public/extensions_delegate.h

Issue 487843003: ExtensionDelegate to abstract extension implementation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed Created 6 years, 4 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: athena/extensions/public/extensions_delegate.h
diff --git a/athena/extensions/public/extensions_delegate.h b/athena/extensions/public/extensions_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..0ad2cad5e52a4efe8383ae7449f6c2dc5d5c4ae5
--- /dev/null
+++ b/athena/extensions/public/extensions_delegate.h
@@ -0,0 +1,48 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ATHENA_EXTENSIONS_PUBLIC_EXTENSIONS_DELEGATE_H_
+#define ATHENA_EXTENSIONS_PUBLIC_EXTENSIONS_DELEGATE_H_
+
+#include <string>
+
+#include "athena/athena_export.h"
+
+namespace content {
+class BrowserContext;
+}
+
+namespace extensions {
+class ExtensionSet;
+}
+
+namespace athena {
+
+// A delegate interface to extension implentation.
+class ATHENA_EXPORT ExtensionsDelegate {
+ public:
+ static ExtensionsDelegate* Get(content::BrowserContext* context);
+
+ // Initializes the extension delegate for app shell environment.
+ static void InitExtensionsDelegateForShell(content::BrowserContext* context);
+
+ // Deletes the singleton instance. This must be called in the reverse
+ // order of the initialization.
+ static void Shutdown();
+
+ ExtensionsDelegate();
+ virtual ~ExtensionsDelegate();
+
+ virtual content::BrowserContext* GetBrowserContext() const = 0;
+
+ // Returns the set of extensions that are currently installed.
Yoyo Zhou 2014/08/21 22:40:29 I find the ownership here a little unintuitive, so
oshima 2014/08/21 23:22:57 Changed to const ExtensionSet& I think that's bett
+ virtual extensions::ExtensionSet* GetInstalledExtensions() = 0;
+
+ // Launch an application specified by |app_id|.
+ virtual void LaunchApp(const std::string& app_id) = 0;
+};
+
+} // namespace athena
+
+#endif // ATHENA_EXTENSIONS_PUBLIC_EXTENSIONS_DELEGATE_H_
« athena/content/DEPS ('K') | « athena/extensions/public/DEPS ('k') | athena/main/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698