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

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

Issue 487843003: ExtensionDelegate to abstract extension implementation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/extension_delegate.h
diff --git a/athena/extensions/public/extension_delegate.h b/athena/extensions/public/extension_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..b34848ecdea8fd25843752952d2c551ef51b7d22
--- /dev/null
+++ b/athena/extensions/public/extension_delegate.h
@@ -0,0 +1,46 @@
+// 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_EXTENSION_DELEGATE_H_
+#define ATHENA_EXTENSIONS_PUBLIC_EXTENSION_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 ExtensionDelegate {
Yoyo Zhou 2014/08/20 20:37:28 nit: We would generally call this ExtensionsDelega
oshima 2014/08/20 21:39:21 Done.
+ public:
+ static ExtensionDelegate* Get(content::BrowserContext* context);
+ static void Shutdown();
Yoyo Zhou 2014/08/20 20:37:28 Document when this gets called.
+
+ // Initializes the extension delegate for app shell environment.
+ static void InitExtensionDelegateForShell(content::BrowserContext* context);
+
+ ExtensionDelegate();
+ virtual ~ExtensionDelegate();
+
+ virtual content::BrowserContext* GetBrowserContext() const = 0;
+
+ // Returns the set of extensions that are currently installed.
+ virtual extensions::ExtensionSet* GetExtensionSet() = 0;
Yoyo Zhou 2014/08/20 20:37:27 I'd prefer something like GetInstalledExtensions.
oshima 2014/08/20 21:39:21 Done.
+
+ // Luanch an applicatino specified by |app_id|.
Yoyo Zhou 2014/08/20 20:37:27 typo: Launch, application
oshima 2014/08/20 21:39:21 Done.
+ virtual void Launch(const std::string& app_id) = 0;
Yoyo Zhou 2014/08/20 20:37:28 LaunchApp would be clearer.
oshima 2014/08/20 21:39:21 Done.
+};
+
+} // namespace athena
+
+#endif // ATHENA_EXTENSIONS_PUBLIC_EXTENSION_DELEGATE_H_
+

Powered by Google App Engine
This is Rietveld 408576698