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

Unified Diff: ui/views/bubble/bubble_frame_view.h

Issue 12096084: Cleanup BubbleFrameView and BubbleBorder construction. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Additional refactoring and cleanup. Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/bubble/bubble_frame_view.h
diff --git a/ui/views/bubble/bubble_frame_view.h b/ui/views/bubble/bubble_frame_view.h
index 3a8b4df780b268d721e5545480ed145a80324027..03b6db7b0c59dd7e123b36464230a41ca9f37345 100644
--- a/ui/views/bubble/bubble_frame_view.h
+++ b/ui/views/bubble/bubble_frame_view.h
@@ -15,12 +15,11 @@ namespace views {
class BubbleBorder;
-// This is a NonClientFrameView used to render the BubbleBorder.
+// The non-client frame view of bubble-styled widgets.
class VIEWS_EXPORT BubbleFrameView : public NonClientFrameView {
public:
- // Sets the border to |border|, taking ownership. Important: do not call
- // set_border() directly to change the border, use SetBubbleBorder() instead.
- BubbleFrameView(const gfx::Insets& margins, BubbleBorder* border);
+
+ explicit BubbleFrameView(const gfx::Insets& content_margins);
virtual ~BubbleFrameView();
// NonClientFrameView overrides:
@@ -37,7 +36,9 @@ class VIEWS_EXPORT BubbleFrameView : public NonClientFrameView {
// View overrides:
virtual gfx::Size GetPreferredSize() OVERRIDE;
+ // Use bubble_border() and SetBubbleBorder(), not border() and set_border().
BubbleBorder* bubble_border() const { return bubble_border_; }
+ void SetBubbleBorder(BubbleBorder* border);
gfx::Insets content_margins() const { return content_margins_; }
@@ -48,8 +49,6 @@ class VIEWS_EXPORT BubbleFrameView : public NonClientFrameView {
gfx::Size client_size,
bool adjust_if_offscreen);
- void SetBubbleBorder(BubbleBorder* border);
-
protected:
// Returns the bounds for the monitor showing the specified |rect|.
// This function is virtual to support testing environments.

Powered by Google App Engine
This is Rietveld 408576698