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

Unified Diff: chrome/browser/ui/views/constrained_window_views.cc

Issue 8488014: Give Constrained windows the proper square frame corners. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/constrained_window_views.cc
===================================================================
--- chrome/browser/ui/views/constrained_window_views.cc (revision 110305)
+++ chrome/browser/ui/views/constrained_window_views.cc (working copy)
@@ -429,19 +429,35 @@
}
void ConstrainedWindowFrameView::PaintFrameBorder(gfx::Canvas* canvas) {
+ ResourceBundle& rb = ResourceBundle::GetSharedInstance();
+#if defined(USE_AURA)
+ // TODO(jamescook): Remove this when Aura defaults to its own window frame,
+ // BrowserNonClientFrameViewAura. Until then, use custom square corners to
+ // avoid performance penalties associated with transparent layers.
+ SkBitmap* top_left_corner = rb.GetBitmapNamed(IDR_AURA_WINDOW_TOP_LEFT);
+ SkBitmap* top_right_corner = rb.GetBitmapNamed(IDR_AURA_WINDOW_TOP_RIGHT);
+ SkBitmap* bottom_left_corner =
+ rb.GetBitmapNamed(IDR_AURA_WINDOW_BOTTOM_LEFT);
+ SkBitmap* bottom_right_corner =
+ rb.GetBitmapNamed(IDR_AURA_WINDOW_BOTTOM_RIGHT);
+ SkBitmap* top_edge = rb.GetBitmapNamed(IDR_WINDOW_TOP_CENTER);
+ SkBitmap* right_edge = rb.GetBitmapNamed(IDR_WINDOW_RIGHT_SIDE);
+ SkBitmap* left_edge = rb.GetBitmapNamed(IDR_WINDOW_LEFT_SIDE);
+ SkBitmap* bottom_edge = rb.GetBitmapNamed(IDR_WINDOW_BOTTOM_CENTER);
+#else
SkBitmap* top_left_corner = resources_->GetPartBitmap(FRAME_TOP_LEFT_CORNER);
SkBitmap* top_right_corner =
resources_->GetPartBitmap(FRAME_TOP_RIGHT_CORNER);
- SkBitmap* top_edge = resources_->GetPartBitmap(FRAME_TOP_EDGE);
- SkBitmap* right_edge = resources_->GetPartBitmap(FRAME_RIGHT_EDGE);
- SkBitmap* left_edge = resources_->GetPartBitmap(FRAME_LEFT_EDGE);
SkBitmap* bottom_left_corner =
resources_->GetPartBitmap(FRAME_BOTTOM_LEFT_CORNER);
SkBitmap* bottom_right_corner =
resources_->GetPartBitmap(FRAME_BOTTOM_RIGHT_CORNER);
+ SkBitmap* top_edge = resources_->GetPartBitmap(FRAME_TOP_EDGE);
+ SkBitmap* right_edge = resources_->GetPartBitmap(FRAME_RIGHT_EDGE);
+ SkBitmap* left_edge = resources_->GetPartBitmap(FRAME_LEFT_EDGE);
SkBitmap* bottom_edge = resources_->GetPartBitmap(FRAME_BOTTOM_EDGE);
+#endif
- ResourceBundle& rb = ResourceBundle::GetSharedInstance();
SkBitmap* theme_frame = rb.GetBitmapNamed(IDR_THEME_FRAME);
SkColor frame_color = ResourceBundle::frame_color;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698