| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_UI_EXTENSIONS_EXTENSION_INSTALLED_BUBBLE_H_ | 5 #ifndef CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_INSTALLED_BUBBLE_H_ |
| 6 #define CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_INSTALLED_BUBBLE_H_ | 6 #define CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_INSTALLED_BUBBLE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 const SkBitmap& icon() const { return icon_; } | 75 const SkBitmap& icon() const { return icon_; } |
| 76 BubbleType type() const { return type_; } | 76 BubbleType type() const { return type_; } |
| 77 bool has_command_keybinding() const { return !!action_command_; } | 77 bool has_command_keybinding() const { return !!action_command_; } |
| 78 int options() const { return options_; } | 78 int options() const { return options_; } |
| 79 AnchorPosition anchor_position() const { return anchor_position_; } | 79 AnchorPosition anchor_position() const { return anchor_position_; } |
| 80 | 80 |
| 81 // BubbleDelegate: | 81 // BubbleDelegate: |
| 82 scoped_ptr<BubbleUi> BuildBubbleUi() override; | 82 scoped_ptr<BubbleUi> BuildBubbleUi() override; |
| 83 bool ShouldClose(BubbleCloseReason reason) const override; | 83 bool ShouldClose(BubbleCloseReason reason) const override; |
| 84 std::string GetName() const override; | 84 std::string GetName() const override; |
| 85 const content::RenderFrameHost* OwningFrame() const override; |
| 85 | 86 |
| 86 // Returns false if the bubble could not be shown immediately, because of an | 87 // Returns false if the bubble could not be shown immediately, because of an |
| 87 // animation (eg. adding a new browser action to the toolbar). | 88 // animation (eg. adding a new browser action to the toolbar). |
| 88 // TODO(hcarmona): Detect animation in a platform-agnostic manner. | 89 // TODO(hcarmona): Detect animation in a platform-agnostic manner. |
| 89 bool ShouldShow(); | 90 bool ShouldShow(); |
| 90 | 91 |
| 91 // Returns the string describing how to use the new extension. | 92 // Returns the string describing how to use the new extension. |
| 92 base::string16 GetHowToUseDescription() const; | 93 base::string16 GetHowToUseDescription() const; |
| 93 | 94 |
| 94 // Handle initialization with the extension. | 95 // Handle initialization with the extension. |
| (...skipping 12 matching lines...) Expand all Loading... |
| 107 // The location where the bubble should be anchored. | 108 // The location where the bubble should be anchored. |
| 108 AnchorPosition anchor_position_; | 109 AnchorPosition anchor_position_; |
| 109 | 110 |
| 110 // The command to execute the extension action, if one exists. | 111 // The command to execute the extension action, if one exists. |
| 111 scoped_ptr<extensions::Command> action_command_; | 112 scoped_ptr<extensions::Command> action_command_; |
| 112 | 113 |
| 113 DISALLOW_COPY_AND_ASSIGN(ExtensionInstalledBubble); | 114 DISALLOW_COPY_AND_ASSIGN(ExtensionInstalledBubble); |
| 114 }; | 115 }; |
| 115 | 116 |
| 116 #endif // CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_INSTALLED_BUBBLE_H_ | 117 #endif // CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_INSTALLED_BUBBLE_H_ |
| OLD | NEW |