Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_UI_VIEWS_VALIDATION_MESSAGE_BUBBLE_DELEGATE_H_ | |
| 6 #define CHROME_BROWSER_UI_VIEWS_VALIDATION_MESSAGE_BUBBLE_DELEGATE_H_ | |
| 7 | |
| 8 #include "ui/views/bubble/bubble_delegate.h" | |
| 9 | |
| 10 // A BubbleDelegateView implementation for form validation message bubble. | |
| 11 // This class is exposed for testing. | |
| 12 class ValidationMessageBubbleDelegate : public views::BubbleDelegateView { | |
| 13 public: | |
| 14 // An interface to observe the widget closing. | |
| 15 class Observer { | |
| 16 public: | |
| 17 virtual void WindowClosing() = 0; | |
| 18 }; | |
|
sky
2013/05/01 23:14:49
Add virtual protected destructor.
tkent
2013/05/01 23:42:16
Done.
| |
| 19 | |
| 20 ValidationMessageBubbleDelegate(const gfx::Rect& anchor_in_screen, | |
| 21 const string16& main_text, | |
| 22 const string16& sub_text, | |
| 23 Observer* observer); | |
| 24 virtual ~ValidationMessageBubbleDelegate(); | |
| 25 | |
| 26 void Hide(); | |
| 27 | |
| 28 // BubbleDelegateView overrides: | |
| 29 virtual gfx::Size GetPreferredSize() OVERRIDE; | |
| 30 virtual void DeleteDelegate() OVERRIDE; | |
| 31 virtual void WindowClosing() OVERRIDE; | |
| 32 | |
| 33 static const int kWindowMinWidth; | |
|
sky
2013/05/01 23:14:49
constants before constructor.
tkent
2013/05/01 23:42:16
Done.
| |
| 34 static const int kWindowMaxWidth; | |
| 35 | |
| 36 private: | |
| 37 Observer* observer_; | |
| 38 int width_; | |
| 39 int height_; | |
| 40 | |
| 41 DISALLOW_COPY_AND_ASSIGN(ValidationMessageBubbleDelegate); | |
| 42 }; | |
| 43 | |
| 44 #endif // CHROME_BROWSER_UI_VIEWS_VALIDATION_MESSAGE_BUBBLE_DELEGATE_H_ | |
| OLD | NEW |