Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // ::Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // ::Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_EXTENSIONS_SETTINGS_API_BUBBLE_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_NTP_CONTROLLED_BUBBLE_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_SETTINGS_API_BUBBLE_CONTROLLER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_NTP_CONTROLLED_BUBBLE_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include "chrome/browser/extensions/extension_message_bubble_controller.h" | 9 #include "chrome/browser/extensions/extension_message_bubble_controller.h" |
| 10 #include "chrome/common/extensions/manifest_handlers/settings_overrides_handler. h" | |
| 11 | 10 |
| 12 class ExtensionService; | 11 class ExtensionService; |
| 13 | 12 |
| 14 namespace extensions { | 13 namespace extensions { |
| 15 | 14 |
| 16 class SettingsApiBubble; | 15 class NtpControlledBubbleController : public ExtensionMessageBubbleController { |
|
Yoyo Zhou
2014/04/23 00:04:24
How about NTPOverriddenBubbleController (since we
Finnur
2014/04/23 13:51:35
Made the change Controlled -> Overridden, but Ntp
| |
| 17 | |
| 18 class SettingsApiBubbleController : public ExtensionMessageBubbleController { | |
| 19 public: | 16 public: |
| 20 SettingsApiBubbleController(Profile* profile, SettingsApiOverrideType type); | 17 explicit NtpControlledBubbleController(Profile* profile); |
| 21 virtual ~SettingsApiBubbleController(); | 18 virtual ~NtpControlledBubbleController(); |
| 22 | 19 |
| 23 // Whether the controller knows that we should show the bubble for extension | 20 // Whether the controller knows that we should show the bubble for extension |
| 24 // with |extension_id|. Returns true if so. | 21 // with |extension_id|. Returns true if so. |
| 25 bool ShouldShow(const std::string& extension_id); | 22 bool ShouldShow(const std::string& extension_id); |
| 26 | 23 |
| 27 // ExtensionMessageBubbleController: | 24 // ExtensionMessageBubbleController: |
| 28 virtual bool CloseOnDeactivate() OVERRIDE; | 25 virtual bool CloseOnDeactivate() OVERRIDE; |
| 29 | 26 |
| 30 private: | 27 private: |
| 31 // A weak pointer to the profile we are associated with. Not owned by us. | 28 // A weak pointer to the profile we are associated with. Not owned by us. |
| 32 Profile* profile_; | 29 Profile* profile_; |
| 33 | 30 |
| 34 // The type of settings override this bubble will report on. | 31 DISALLOW_COPY_AND_ASSIGN(NtpControlledBubbleController); |
| 35 SettingsApiOverrideType type_; | |
| 36 | |
| 37 DISALLOW_COPY_AND_ASSIGN(SettingsApiBubbleController); | |
| 38 }; | 32 }; |
| 39 | 33 |
| 40 } // namespace extensions | 34 } // namespace extensions |
| 41 | 35 |
| 42 #endif // CHROME_BROWSER_EXTENSIONS_SETTINGS_API_BUBBLE_CONTROLLER_H_ | 36 #endif // CHROME_BROWSER_EXTENSIONS_NTP_CONTROLLED_BUBBLE_CONTROLLER_H_ |
| OLD | NEW |