#ifndef CHROME_BROWSER_EXTENSIONS_DEV_MODE_BUBBLE_CONTROLLER_H_
#define CHROME_BROWSER_EXTENSIONS_DEV_MODE_BUBBLE_CONTROLLER_H_
#include <string>
#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 {
namespace {
class DevModeBubbleDelegate
: public ExtensionMessageBubbleController::Delegate {
public:
explicit DevModeBubbleDelegate(Profile* profile);
virtual ~DevModeBubbleDelegate();
virtual bool ShouldIncludeExtension(const std::string& extension_id) OVERRIDE;
virtual void AcknowledgeExtension(
const std::string& extension_id,
ExtensionMessageBubbleController::BubbleAction user_action) OVERRIDE;
virtual void PerformAction(const ExtensionIdList& list) OVERRIDE;
virtual void OnClose() OVERRIDE;
virtual base::string16 GetTitle() const OVERRIDE;
virtual base::string16 GetMessageBody() const OVERRIDE;
virtual base::string16 GetOverflowText(
const base::string16& overflow_count) const OVERRIDE;
virtual base::string16 GetLearnMoreLabel() const OVERRIDE;
virtual GURL GetLearnMoreUrl() const OVERRIDE;
virtual base::string16 GetActionButtonLabel() const OVERRIDE;
virtual base::string16 GetDismissButtonLabel() const OVERRIDE;
virtual bool ShouldShowExtensionList() const OVERRIDE;
virtual void LogExtensionCount(size_t count) OVERRIDE;
virtual void LogAction(
ExtensionMessageBubbleController::BubbleAction action) OVERRIDE;
private:
Profile* profile_;
ExtensionService* service_;
DISALLOW_COPY_AND_ASSIGN(DevModeBubbleDelegate);
};
}
class DevModeBubble;
class DevModeBubbleController
: public ExtensionMessageBubbleController {
public:
static void ClearProfileListForTesting();
static bool IsDevModeExtension(const Extension* extension);
explicit DevModeBubbleController(Profile* profile);
virtual ~DevModeBubbleController();
bool ShouldShow();
virtual void Show(ExtensionMessageBubble* bubble) OVERRIDE;
private:
Profile* profile_;
DISALLOW_COPY_AND_ASSIGN(DevModeBubbleController);
};
}
#endif