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

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

Issue 10905311: Consolidate bubble border code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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_delegate.h
diff --git a/ui/views/bubble/bubble_delegate.h b/ui/views/bubble/bubble_delegate.h
index dd29da79bdfce68f26f1b407353a6a101a587dd8..ed37a7b13f32c2ff72fe4ba84b62fe1c378ed128 100644
--- a/ui/views/bubble/bubble_delegate.h
+++ b/ui/views/bubble/bubble_delegate.h
@@ -67,6 +67,11 @@ class VIEWS_EXPORT BubbleDelegateView : public WidgetDelegateView,
arrow_location_ = arrow_location;
}
+ BubbleBorder::Shadow border_shadow() const { return border_shadow_; }
+ void set_border_shadow(BubbleBorder::Shadow border_shadow) {
+ border_shadow_ = border_shadow;
+ }
+
SkColor color() const { return color_; }
void set_color(SkColor color) { color_ = color; }
@@ -87,9 +92,9 @@ class VIEWS_EXPORT BubbleDelegateView : public WidgetDelegateView,
bool accept_events() const { return accept_events_; }
void set_accept_events(bool accept_events) { accept_events_ = accept_events; }
- bool try_mirroring_arrow() const { return try_mirroring_arrow_; }
- void set_try_mirroring_arrow(bool try_mirroring_arrow) {
- try_mirroring_arrow_ = try_mirroring_arrow;
+ bool try_fit_bubble() const { return try_fit_bubble_; }
+ void set_try_fit_bubble(bool try_fit_bubble) {
+ try_fit_bubble_ = try_fit_bubble;
}
// Get the arrow's anchor rect in screen space.
@@ -173,6 +178,9 @@ class VIEWS_EXPORT BubbleDelegateView : public WidgetDelegateView,
// The arrow's location on the bubble.
BubbleBorder::ArrowLocation arrow_location_;
+ // Bubble border shadow to use.
+ BubbleBorder::Shadow border_shadow_;
+
// The background color of the bubble.
SkColor color_;
@@ -195,9 +203,9 @@ class VIEWS_EXPORT BubbleDelegateView : public WidgetDelegateView,
// Specifies whether the popup accepts events or lets them pass through.
bool accept_events_;
- // If true (defaults to true), the arrow may be mirrored to fit the
- // bubble on screen better.
- bool try_mirroring_arrow_;
+ // If true (defaults to true), the arrow may be mirrored and moved o fit the
+ // bubble on screen better. It would be a no-op if bubble has no arrow.
+ bool try_fit_bubble_;
// Parent native window of the bubble.
gfx::NativeView parent_window_;

Powered by Google App Engine
This is Rietveld 408576698