Index: ui/views/bubble/info_bubble.h |
diff --git a/chrome/browser/ui/views/autofill/info_bubble.h b/ui/views/bubble/info_bubble.h |
similarity index 68% |
rename from chrome/browser/ui/views/autofill/info_bubble.h |
rename to ui/views/bubble/info_bubble.h |
index d91be82bfd872a7fd1dba1058ab89aa849515787..6493d72fd4f8b36fda5eebf02e1409d721d39468 100644 |
--- a/chrome/browser/ui/views/autofill/info_bubble.h |
+++ b/ui/views/bubble/info_bubble.h |
@@ -2,8 +2,8 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef CHROME_BROWSER_UI_VIEWS_AUTOFILL_INFO_BUBBLE_H_ |
-#define CHROME_BROWSER_UI_VIEWS_AUTOFILL_INFO_BUBBLE_H_ |
+#ifndef UI_VIEWS_BUBBLE_INFO_BUBBLE_H_ |
+#define UI_VIEWS_BUBBLE_INFO_BUBBLE_H_ |
#include "base/compiler_specific.h" |
#include "base/macros.h" |
@@ -11,14 +11,14 @@ |
#include "ui/gfx/geometry/insets.h" |
msw
2017/02/15 21:06:38
nit: remove
vasilii
2017/02/16 14:28:06
Done.
|
#include "ui/views/bubble/bubble_dialog_delegate.h" |
-namespace autofill { |
+namespace views { |
class InfoBubbleFrame; |
// Class to create and manage an information bubble for errors or tooltips. |
-class InfoBubble : public views::BubbleDialogDelegateView { |
+class InfoBubble : public BubbleDialogDelegateView { |
public: |
- InfoBubble(views::View* anchor, const base::string16& message); |
+ InfoBubble(View* anchor, const base::string16& message); |
~InfoBubble() override; |
// Shows the bubble. |widget_| will be NULL until this is called. |
@@ -30,17 +30,17 @@ class InfoBubble : public views::BubbleDialogDelegateView { |
// Updates the position of the bubble. |
void UpdatePosition(); |
msw
2017/02/15 21:06:38
nit: private if possible (and reorder the definiti
vasilii
2017/02/16 14:28:06
Done.
|
- // views::BubbleDialogDelegateView: |
- views::NonClientFrameView* CreateNonClientFrameView( |
- views::Widget* widget) override; |
+ // BubbleDialogDelegateView: |
+ NonClientFrameView* CreateNonClientFrameView(Widget* widget) override; |
gfx::Size GetPreferredSize() const override; |
- void OnWidgetDestroyed(views::Widget* widget) override; |
- void OnWidgetBoundsChanged(views::Widget* widget, |
+ void OnWidgetDestroyed(Widget* widget) override; |
+ void OnWidgetBoundsChanged(Widget* widget, |
const gfx::Rect& new_bounds) override; |
int GetDialogButtons() const override; |
+ gfx::Rect GetAnchorRect() const override; |
- views::View* anchor() { return anchor_; } |
- const views::View* anchor() const { return anchor_; } |
+ View* anchor() { return anchor_; } |
+ const View* anchor() const { return anchor_; } |
void set_align_to_anchor_edge(bool align_to_anchor_edge) { |
msw
2017/02/15 21:06:38
nit: remove setter and member if unused
vasilii
2017/02/16 14:28:06
Done.
|
align_to_anchor_edge_ = align_to_anchor_edge; |
@@ -55,8 +55,8 @@ class InfoBubble : public views::BubbleDialogDelegateView { |
} |
private: |
- views::Widget* widget_; // Weak, may be NULL. |
- views::View* const anchor_; // Weak. |
+ Widget* widget_; // Weak, may be NULL. |
+ View* const anchor_; // Weak. |
InfoBubbleFrame* frame_; // Weak, owned by widget. |
// Whether the bubble should align its border to the anchor's edge rather than |
@@ -72,6 +72,6 @@ class InfoBubble : public views::BubbleDialogDelegateView { |
DISALLOW_COPY_AND_ASSIGN(InfoBubble); |
}; |
-} // namespace autofill |
+} // namespace views |
-#endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_INFO_BUBBLE_H_ |
+#endif // UI_VIEWS_BUBBLE_INFO_BUBBLE_H_ |