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

Unified Diff: chrome/browser/views/bubble_border.h

Issue 259065: Add an BubbleBorder to BrowserAction popups and fix positioning of the (Closed)
Patch Set: cleanup Created 11 years, 2 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
« no previous file with comments | « chrome/browser/views/browser_bubble_win.cc ('k') | chrome/browser/views/bubble_border.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/bubble_border.h
diff --git a/chrome/browser/views/bubble_border.h b/chrome/browser/views/bubble_border.h
index 75f7a0290a7218bb17cbf4630540650f68a1dcf4..f7af358c7cbbde88a862b5904ed573c052cd7476 100644
--- a/chrome/browser/views/bubble_border.h
+++ b/chrome/browser/views/bubble_border.h
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_VIEWS_BUBBLE_BORDER_H_
#include "third_party/skia/include/core/SkColor.h"
+#include "views/background.h"
#include "views/border.h"
class SkBitmap;
@@ -46,6 +47,7 @@ class BubbleBorder : public views::Border {
void set_background_color(SkColor background_color) {
background_color_ = background_color;
}
+ SkColor background_color() const { return background_color_; }
// For borders with an arrow, gives the desired bounds (in screen coordinates)
// given the rect to point to and the size of the contained contents. This
@@ -99,4 +101,19 @@ class BubbleBorder : public views::Border {
DISALLOW_COPY_AND_ASSIGN(BubbleBorder);
};
+// A Background that clips itself to the specified BubbleBorder and uses
+// the background color of the BubbleBorder.
+class BubbleBackground : public views::Background {
+public:
+ BubbleBackground(BubbleBorder* border) : border_(border) {}
+
+ // Background overrides.
+ virtual void Paint(gfx::Canvas* canvas, views::View* view) const;
+
+private:
+ BubbleBorder* border_;
+
+ DISALLOW_COPY_AND_ASSIGN(BubbleBackground);
+};
+
#endif // #ifndef CHROME_BROWSER_VIEWS_BUBBLE_BORDER_H_
« no previous file with comments | « chrome/browser/views/browser_bubble_win.cc ('k') | chrome/browser/views/bubble_border.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698