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

Unified Diff: views/bubble/bubble_border.h

Issue 8565034: Add a drop shadow to the fullscreen exit bubble on windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 1 month 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
« no previous file with comments | « views/bubble/border_contents_view.cc ('k') | views/bubble/bubble_border.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/bubble/bubble_border.h
diff --git a/views/bubble/bubble_border.h b/views/bubble/bubble_border.h
index edca71e0b6ce17581c96f5002e0617d7dc6506c6..7f00072eab9770f19cb301ff49da8f361d7b7fa8 100644
--- a/views/bubble/bubble_border.h
+++ b/views/bubble/bubble_border.h
@@ -34,6 +34,11 @@ class VIEWS_EXPORT BubbleBorder : public views::Border {
FLOAT = 9 // No arrow. Centered over the supplied rect.
};
+ enum Shadow {
+ SHADOW = 0,
+ NO_SHADOW = 1
+ };
+
// The position of the bubble in relation to the anchor.
enum BubbleAlignment {
// The tip of the arrow points to the middle of the anchor.
@@ -42,13 +47,7 @@ class VIEWS_EXPORT BubbleBorder : public views::Border {
ALIGN_EDGE_TO_ANCHOR_EDGE
};
- explicit BubbleBorder(ArrowLocation arrow_location)
- : override_arrow_offset_(0),
- arrow_location_(arrow_location),
- alignment_(ALIGN_ARROW_TO_MID_ANCHOR),
- background_color_(SK_ColorWHITE) {
- InitClass();
- }
+ BubbleBorder(ArrowLocation arrow_location, Shadow shadow);
// Returns the radius of the corner of the border.
static int GetCornerRadius() {
@@ -117,8 +116,10 @@ class VIEWS_EXPORT BubbleBorder : public views::Border {
virtual void GetInsets(gfx::Insets* insets) const;
private:
+ struct BorderImages;
+
// Loads images if necessary.
- static void InitClass();
+ static BorderImages* GetBorderImages(Shadow shadow);
virtual ~BubbleBorder();
@@ -143,21 +144,14 @@ class VIEWS_EXPORT BubbleBorder : public views::Border {
int shift_y) const;
// Border graphics.
- static SkBitmap* left_;
- static SkBitmap* top_left_;
- static SkBitmap* top_;
- static SkBitmap* top_right_;
- static SkBitmap* right_;
- static SkBitmap* bottom_right_;
- static SkBitmap* bottom_;
- static SkBitmap* bottom_left_;
- static SkBitmap* left_arrow_;
- static SkBitmap* top_arrow_;
- static SkBitmap* right_arrow_;
- static SkBitmap* bottom_arrow_;
+ struct BorderImages* images_;
+
+ // Image bundles.
+ static struct BorderImages* normal_images_;
+ static struct BorderImages* shadow_images_;
// Minimal offset of the arrow from the closet edge of bounding rect.
- static int arrow_offset_;
+ int arrow_offset_;
// If specified, overrides the pre-calculated |arrow_offset_| of the arrow.
int override_arrow_offset_;
« no previous file with comments | « views/bubble/border_contents_view.cc ('k') | views/bubble/bubble_border.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698