Chromium Code Reviews| Index: chrome/browser/ui/cocoa/validation_message_bubble_cocoa.h |
| diff --git a/chrome/browser/ui/cocoa/validation_message_bubble_cocoa.h b/chrome/browser/ui/cocoa/validation_message_bubble_cocoa.h |
| index 3defb6793b8bc5ae4f70b7fbcea433b0e324cafe..1357fd0e777bbd9ad6b48cbdbafd2a6ac73802d3 100644 |
| --- a/chrome/browser/ui/cocoa/validation_message_bubble_cocoa.h |
| +++ b/chrome/browser/ui/cocoa/validation_message_bubble_cocoa.h |
| @@ -7,6 +7,7 @@ |
| #include "base/mac/scoped_nsobject.h" |
| #include "base/macros.h" |
| +#include "base/memory/weak_ptr.h" |
| #include "chrome/browser/ui/validation_message_bubble.h" |
| @class ValidationMessageBubbleController; |
| @@ -15,7 +16,9 @@ namespace content { |
| class WebContents; |
| } |
| -class ValidationMessageBubbleCocoa : public ValidationMessageBubble { |
| +class ValidationMessageBubbleCocoa |
| + : public ValidationMessageBubble, |
| + public base::SupportsWeakPtr<ValidationMessageBubbleCocoa> { |
|
groby-ooo-7-16
2016/04/13 01:42:31
You're aware of the lifetime issues (WeakPtr is on
Evan Stade
2016/04/13 15:39:19
supports is fine for our purposes, I think.
|
| public: |
| ValidationMessageBubbleCocoa(content::WebContents* web_contents, |
| const gfx::Rect& anchor_in_root_view, |
| @@ -27,6 +30,7 @@ class ValidationMessageBubbleCocoa : public ValidationMessageBubble { |
| void SetPositionRelativeToAnchor( |
| content::RenderWidgetHost* widget_host, |
| const gfx::Rect& anchor_in_root_view) override; |
| + void CloseValidationMessage() override; |
| private: |
| base::scoped_nsobject<ValidationMessageBubbleController> controller_; |