Popular sites on the NTP: check that experiment group StartsWith (rather than IS...
[chromium-blink-merge.git] / chrome / browser / ui / validation_message_bubble.h
blob74f5b9b9384900e116ab73c39e8291d25bcc7008
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.
5 #ifndef CHROME_BROWSER_UI_VALIDATION_MESSAGE_BUBBLE_H_
6 #define CHROME_BROWSER_UI_VALIDATION_MESSAGE_BUBBLE_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "base/strings/string16.h"
11 namespace content {
12 class RenderWidgetHost;
15 namespace gfx {
16 class Rect;
19 class ValidationMessageBubble {
20 public:
21 // Open a tooltip-like window to show the specified messages. The window
22 // should not change focus state.
23 static scoped_ptr<ValidationMessageBubble> CreateAndShow(
24 content::RenderWidgetHost* widget_host,
25 const gfx::Rect& anchor_in_root_view,
26 const base::string16& main_text,
27 const base::string16& sub_text);
29 // Close the window and destruct the object.
30 virtual ~ValidationMessageBubble() {}
32 // Move the window to a position such that the bubble arrow points to the
33 // specified anchor. |anchor_in_root_view| is in DIP unit, and relative to
34 // RWHV for |widget_host|.
35 virtual void SetPositionRelativeToAnchor(
36 content::RenderWidgetHost* widget_host,
37 const gfx::Rect& anchor_in_root_view) = 0;
40 #endif // CHROME_BROWSER_UI_VALIDATION_MESSAGE_BUBBLE_H_