OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_VIEWS_VALIDATION_MESSAGE_BUBBLE_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_VALIDATION_MESSAGE_BUBBLE_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_VALIDATION_MESSAGE_BUBBLE_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_VALIDATION_MESSAGE_BUBBLE_VIEW_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "chrome/browser/ui/validation_message_bubble.h" | 10 #include "chrome/browser/ui/validation_message_bubble.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 public ValidationMessageBubble, | 22 public ValidationMessageBubble, |
23 public base::SupportsWeakPtr<ValidationMessageBubbleView> { | 23 public base::SupportsWeakPtr<ValidationMessageBubbleView> { |
24 public: | 24 public: |
25 ValidationMessageBubbleView(content::WebContents* web_contents, | 25 ValidationMessageBubbleView(content::WebContents* web_contents, |
26 const gfx::Rect& anchor_in_root_view, | 26 const gfx::Rect& anchor_in_root_view, |
27 const base::string16& main_text, | 27 const base::string16& main_text, |
28 const base::string16& sub_text); | 28 const base::string16& sub_text); |
29 ~ValidationMessageBubbleView() override; | 29 ~ValidationMessageBubbleView() override; |
30 | 30 |
31 // BubbleDialogDelegateView overrides: | 31 // BubbleDialogDelegateView overrides: |
32 gfx::Size GetPreferredSize() const override; | |
33 int GetDialogButtons() const override; | 32 int GetDialogButtons() const override; |
34 | 33 |
35 // ValidationMessageBubble overrides: | 34 // ValidationMessageBubble overrides: |
36 void SetPositionRelativeToAnchor( | 35 void SetPositionRelativeToAnchor( |
37 content::RenderWidgetHost* widget_host, | 36 content::RenderWidgetHost* widget_host, |
38 const gfx::Rect& anchor_in_root_view) override; | 37 const gfx::Rect& anchor_in_root_view) override; |
39 void CloseValidationMessage() override; | 38 void CloseValidationMessage() override; |
40 | 39 |
41 private: | 40 private: |
42 gfx::Rect RootViewToScreenRect( | 41 gfx::Rect RootViewToScreenRect( |
43 const gfx::Rect& rect_in_root_view, | 42 const gfx::Rect& rect_in_root_view, |
44 const content::RenderWidgetHostView* render_widget_host_view) const; | 43 const content::RenderWidgetHostView* render_widget_host_view) const; |
45 | 44 |
46 gfx::Size size_; | |
47 | |
48 DISALLOW_COPY_AND_ASSIGN(ValidationMessageBubbleView); | 45 DISALLOW_COPY_AND_ASSIGN(ValidationMessageBubbleView); |
49 }; | 46 }; |
50 | 47 |
51 #endif // CHROME_BROWSER_UI_VIEWS_VALIDATION_MESSAGE_BUBBLE_VIEW_H_ | 48 #endif // CHROME_BROWSER_UI_VIEWS_VALIDATION_MESSAGE_BUBBLE_VIEW_H_ |
OLD | NEW |