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

Unified Diff: chrome/browser/extensions/dev_mode_bubble_controller.h

Issue 95133002: Add an extension bubble explaining which extensions are in dev mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync'ed Created 7 years 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: chrome/browser/extensions/dev_mode_bubble_controller.h
diff --git a/chrome/browser/extensions/dev_mode_bubble_controller.h b/chrome/browser/extensions/dev_mode_bubble_controller.h
new file mode 100644
index 0000000000000000000000000000000000000000..65a320fb0fc3070b252f78335bfdf8509b09b4d3
--- /dev/null
+++ b/chrome/browser/extensions/dev_mode_bubble_controller.h
@@ -0,0 +1,59 @@
+// Copyright (c) 2013 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 CHROME_BROWSER_EXTENSIONS_DEV_MODE_BUBBLE_CONTROLLER_H_
+#define CHROME_BROWSER_EXTENSIONS_DEV_MODE_BUBBLE_CONTROLLER_H_
+
+#include <string>
+#include "chrome/browser/extensions/api/profile_keyed_api_factory.h"
+#include "chrome/browser/extensions/extension_message_bubble_controller.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
+#include "extensions/common/extension.h"
+
+class Browser;
+class ExtensionService;
+
+namespace extensions {
+
+class DevModeBubble;
+
+class DevModeBubbleController
+ : public ProfileKeyedAPI,
+ public ExtensionMessageBubbleController {
+ public:
+ explicit DevModeBubbleController(Profile* profile);
+ virtual ~DevModeBubbleController();
+
+ // ProfileKeyedAPI implementation.
+ static ProfileKeyedAPIFactory<DevModeBubbleController>* GetFactoryInstance();
+
+ // Convenience method to get the DevModeBubbleController for a
+ // profile.
+ static DevModeBubbleController* Get(Profile* profile);
+
+ private:
+ friend class ProfileKeyedAPIFactory<DevModeBubbleController>;
+
+ // ProfileKeyedAPI implementation.
+ static const char* service_name() {
+ return "DevModeBubbleController";
+ }
+ static const bool kServiceRedirectedInIncognito = true;
+
+ // ExtensionMessageBubbleController methods.
+ virtual bool ShouldIncludeExtension(const std::string& extension_id) OVERRIDE;
+ virtual void AcknowledgeExtension(const std::string& extension_id) OVERRIDE;
+ virtual void PerformAction() OVERRIDE;
+
+ DISALLOW_COPY_AND_ASSIGN(DevModeBubbleController);
+};
+
+template <>
+void ProfileKeyedAPIFactory<
+ DevModeBubbleController>::DeclareFactoryDependencies();
+
+} // namespace extensions
+
+#endif // CHROME_BROWSER_EXTENSIONS_DEV_MODE_BUBBLE_CONTROLLER_H_

Powered by Google App Engine
This is Rietveld 408576698