OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 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. |
| 4 |
| 5 #ifndef CHROME_BROWSER_EXTENSIONS_DEV_MODE_BUBBLE_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_DEV_MODE_BUBBLE_CONTROLLER_H_ |
| 7 |
| 8 #include <string> |
| 9 #include "chrome/browser/extensions/api/profile_keyed_api_factory.h" |
| 10 #include "chrome/browser/extensions/extension_message_bubble_controller.h" |
| 11 #include "content/public/browser/notification_observer.h" |
| 12 #include "content/public/browser/notification_registrar.h" |
| 13 #include "extensions/common/extension.h" |
| 14 |
| 15 class Browser; |
| 16 class ExtensionService; |
| 17 |
| 18 namespace extensions { |
| 19 |
| 20 class DevModeBubble; |
| 21 |
| 22 class DevModeBubbleController |
| 23 : public ProfileKeyedAPI, |
| 24 public ExtensionMessageBubbleController { |
| 25 public: |
| 26 explicit DevModeBubbleController(Profile* profile); |
| 27 virtual ~DevModeBubbleController(); |
| 28 |
| 29 // ProfileKeyedAPI implementation. |
| 30 static ProfileKeyedAPIFactory<DevModeBubbleController>* GetFactoryInstance(); |
| 31 |
| 32 // Convenience method to get the DevModeBubbleController for a |
| 33 // profile. |
| 34 static DevModeBubbleController* Get(Profile* profile); |
| 35 |
| 36 private: |
| 37 friend class ProfileKeyedAPIFactory<DevModeBubbleController>; |
| 38 |
| 39 // ProfileKeyedAPI implementation. |
| 40 static const char* service_name() { |
| 41 return "DevModeBubbleController"; |
| 42 } |
| 43 static const bool kServiceRedirectedInIncognito = true; |
| 44 |
| 45 // ExtensionMessageBubbleController methods. |
| 46 virtual bool ShouldIncludeExtension(const std::string& extension_id) OVERRIDE; |
| 47 virtual void AcknowledgeExtension(const std::string& extension_id) OVERRIDE; |
| 48 virtual void PerformAction() OVERRIDE; |
| 49 |
| 50 DISALLOW_COPY_AND_ASSIGN(DevModeBubbleController); |
| 51 }; |
| 52 |
| 53 template <> |
| 54 void ProfileKeyedAPIFactory< |
| 55 DevModeBubbleController>::DeclareFactoryDependencies(); |
| 56 |
| 57 } // namespace extensions |
| 58 |
| 59 #endif // CHROME_BROWSER_EXTENSIONS_DEV_MODE_BUBBLE_CONTROLLER_H_ |
OLD | NEW |