| Index: chrome/browser/ui/views/validation_message_bubble_view.h
|
| diff --git a/chrome/browser/ui/views/validation_message_bubble_view.h b/chrome/browser/ui/views/validation_message_bubble_view.h
|
| index 3d2f3a05fdbcc8372dcbf86df43fb0e98ea381b5..b496b5bbb7a7200b28f3b5c97229f5045f40f7ad 100644
|
| --- a/chrome/browser/ui/views/validation_message_bubble_view.h
|
| +++ b/chrome/browser/ui/views/validation_message_bubble_view.h
|
| @@ -6,8 +6,10 @@
|
| #define CHROME_BROWSER_UI_VIEWS_VALIDATION_MESSAGE_BUBBLE_VIEW_H_
|
|
|
| #include "base/macros.h"
|
| +#include "base/memory/weak_ptr.h"
|
| #include "chrome/browser/ui/validation_message_bubble.h"
|
| -#include "chrome/browser/ui/views/validation_message_bubble_delegate.h"
|
| +#include "ui/gfx/geometry/size.h"
|
| +#include "ui/views/bubble/bubble_dialog_delegate.h"
|
|
|
| namespace content {
|
| class WebContents;
|
| @@ -15,8 +17,9 @@ class WebContents;
|
|
|
| // A ValidationMessageBubble implementation for Views.
|
| class ValidationMessageBubbleView
|
| - : public ValidationMessageBubble,
|
| - public ValidationMessageBubbleDelegate::Observer {
|
| + : public views::BubbleDialogDelegateView,
|
| + public ValidationMessageBubble,
|
| + public base::SupportsWeakPtr<ValidationMessageBubbleView> {
|
| public:
|
| ValidationMessageBubbleView(content::WebContents* web_contents,
|
| const gfx::Rect& anchor_in_root_view,
|
| @@ -24,16 +27,18 @@ class ValidationMessageBubbleView
|
| const base::string16& sub_text);
|
| ~ValidationMessageBubbleView() override;
|
|
|
| + // BubbleDialogDelegateView overrides:
|
| + gfx::Size GetPreferredSize() const override;
|
| + int GetDialogButtons() const override;
|
| +
|
| // ValidationMessageBubble overrides:
|
| void SetPositionRelativeToAnchor(
|
| content::RenderWidgetHost* widget_host,
|
| const gfx::Rect& anchor_in_root_view) override;
|
| -
|
| - // ValidationMessageBubbleDelegate::Observer overrides:
|
| - void WindowClosing() override;
|
| + void CloseValidationMessage() override;
|
|
|
| private:
|
| - ValidationMessageBubbleDelegate* delegate_;
|
| + gfx::Size size_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(ValidationMessageBubbleView);
|
| };
|
|
|