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..9e1a71d8de6df4ee41d0975a404fa00ad20e9f20 100644 |
--- a/chrome/browser/ui/views/validation_message_bubble_view.h |
+++ b/chrome/browser/ui/views/validation_message_bubble_view.h |
@@ -6,8 +6,9 @@ |
#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/views/bubble/bubble_dialog_delegate.h" |
namespace content { |
class WebContents; |
@@ -15,26 +16,32 @@ class WebContents; |
// A ValidationMessageBubble implementation for Views. |
class ValidationMessageBubbleView |
- : public ValidationMessageBubble, |
- public ValidationMessageBubbleDelegate::Observer { |
+ : public views::BubbleDialogDelegateView, |
+ public ValidationMessageBubble, |
+ public base::SupportsWeakPtr<ValidationMessageBubbleView> { |
public: |
+ static const int kWindowMinWidth; |
msw
2016/04/14 01:51:38
Can these be moved to the cc file if you're removi
Evan Stade
2016/04/18 01:16:43
Done.
|
+ static const int kWindowMaxWidth; |
+ |
ValidationMessageBubbleView(content::WebContents* web_contents, |
const gfx::Rect& anchor_in_root_view, |
const base::string16& main_text, |
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_; |
- |
+ int width_; |
msw
2016/04/14 01:51:38
nit: gfx::Size?
Evan Stade
2016/04/18 01:16:43
Done.
|
+ int height_; |
DISALLOW_COPY_AND_ASSIGN(ValidationMessageBubbleView); |
msw
2016/04/14 01:51:38
nit: blank line above?
Evan Stade
2016/04/18 01:16:43
Done.
|
}; |