1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_MESSAGE_BUBBLE_FACTORY_H_
6 #define CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_MESSAGE_BUBBLE_FACTORY_H_
8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
13 namespace extensions
{
14 class ExtensionMessageBubbleController
;
15 } // namespace extensions
17 // Create and show ExtensionMessageBubbles for either extensions that look
18 // suspicious and have therefore been disabled, or for extensions that are
19 // running in developer mode that we want to warn the user about.
20 class ExtensionMessageBubbleFactory
{
22 // An enum to allow us to override the default behavior for testing.
23 enum OverrideForTesting
{
29 explicit ExtensionMessageBubbleFactory(Browser
* browser
);
30 ~ExtensionMessageBubbleFactory();
32 // Returns the controller for the bubble that should be shown, if any.
33 scoped_ptr
<extensions::ExtensionMessageBubbleController
> GetController();
35 // Overrides the default behavior for testing.
36 static void set_override_for_tests(OverrideForTesting override
);
41 DISALLOW_COPY_AND_ASSIGN(ExtensionMessageBubbleFactory
);
44 #endif // CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_MESSAGE_BUBBLE_FACTORY_H_