Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 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_VALIDATION_MESSAGE_BUBBLE_H_ | 5 #ifndef CHROME_BROWSER_UI_VALIDATION_MESSAGE_BUBBLE_H_ |
| 6 #define CHROME_BROWSER_UI_VALIDATION_MESSAGE_BUBBLE_H_ | 6 #define CHROME_BROWSER_UI_VALIDATION_MESSAGE_BUBBLE_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/string16.h" | 9 #include "base/string16.h" |
| 10 | 10 |
| 11 namespace content { | 11 namespace content { |
| 12 class RenderWidgetHost; | 12 class RenderWidgetHost; |
| 13 } | 13 } |
| 14 | 14 |
| 15 namespace gfx { | 15 namespace gfx { |
| 16 class Rect; | 16 class Rect; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace chrome { | 19 namespace chrome { |
| 20 | 20 |
| 21 class ValidationMessageBubble { | 21 class ValidationMessageBubble { |
| 22 public: | 22 public: |
| 23 // Open a tooltip-like window to show the specified messages. The window | 23 // Open a tooltip-like window to show the specified messages. The window |
| 24 // should not change focus state. | 24 // should not change focus state. |
| 25 static scoped_ptr<ValidationMessageBubble> CreateAndShow( | 25 static scoped_ptr<ValidationMessageBubble> CreateAndShow( |
| 26 content::RenderWidgetHost* widget_host, | 26 content::RenderWidgetHost* widget_host, |
| 27 const gfx::Rect& anchor_in_screen, | 27 const gfx::Rect& anchor_in_root_view, |
| 28 const string16& main_text, | 28 const string16& main_text, |
| 29 const string16& sub_text); | 29 const string16& sub_text); |
| 30 | 30 |
| 31 // Close the window and destruct the object. | 31 // Close the window and destruct the object. |
| 32 virtual ~ValidationMessageBubble() {} | 32 virtual ~ValidationMessageBubble() {} |
| 33 | |
| 34 // Move the window on the specified anchor. | |
|
Nico
2013/06/07 16:35:31
s/on/to/
Nico
2013/06/07 16:35:31
Say which coordinate system the anchor is in (rela
sky
2013/06/07 17:52:52
This name is also confusing. Maybe something like
tkent
2013/06/10 06:15:37
ok, add comments and renamed it to SetPositionRela
| |
| 35 virtual void MoveOnAnchor( | |
| 36 content::RenderWidgetHost* widget_host, | |
| 37 const gfx::Rect& anchor_in_root_view) = 0; | |
| 33 }; | 38 }; |
| 34 | 39 |
| 35 } // namespace chrome | 40 } // namespace chrome |
| 36 | 41 |
| 37 #endif // CHROME_BROWSER_UI_VALIDATION_MESSAGE_BUBBLE_H_ | 42 #endif // CHROME_BROWSER_UI_VALIDATION_MESSAGE_BUBBLE_H_ |
| OLD | NEW |