Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(315)

Side by Side Diff: chrome/browser/ui/validation_message_bubble.h

Issue 16583005: Some improvement of validation message bubble UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/strings/string16.h" 9 #include "base/strings/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 to a position such that the bubble arrow points to the
35 // specified anchor. |anchor_in_root_view| is in DIP unit, and relative to
36 // RWHV for |widget_host|.
37 virtual void SetPositionRelativeToAnchor(
38 content::RenderWidgetHost* widget_host,
39 const gfx::Rect& anchor_in_root_view) = 0;
33 }; 40 };
34 41
35 } // namespace chrome 42 } // namespace chrome
36 43
37 #endif // CHROME_BROWSER_UI_VALIDATION_MESSAGE_BUBBLE_H_ 44 #endif // CHROME_BROWSER_UI_VALIDATION_MESSAGE_BUBBLE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/validation_message_bubble_gtk.cc ('k') | chrome/browser/ui/views/validation_message_bubble_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698