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

Unified Diff: ui/views/window/custom_frame_view.cc

Issue 8574033: Beginnings of Window Modality support. (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
Index: ui/views/window/custom_frame_view.cc
===================================================================
--- ui/views/window/custom_frame_view.cc (revision 110305)
+++ ui/views/window/custom_frame_view.cc (working copy)
@@ -328,16 +328,28 @@
frame_color = ResourceBundle::frame_color_inactive;
}
+#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);
+#else
SkBitmap* top_left_corner = rb.GetBitmapNamed(IDR_WINDOW_TOP_LEFT_CORNER);
SkBitmap* top_right_corner =
rb.GetBitmapNamed(IDR_WINDOW_TOP_RIGHT_CORNER);
- 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_left_corner =
rb.GetBitmapNamed(IDR_WINDOW_BOTTOM_LEFT_CORNER);
SkBitmap* bottom_right_corner =
rb.GetBitmapNamed(IDR_WINDOW_BOTTOM_RIGHT_CORNER);
+#endif
+ 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);
// Fill with the frame color first so we have a constant background for
@@ -365,8 +377,11 @@
}
}
+ // Don't draw the colored frame on Aura, just the frame color.
+#if !defined(USE_AURA)
// Draw the theme frame.
canvas->TileImageInt(*frame_image, 0, 0, width(), frame_image->height());
+#endif
// Top.
canvas->DrawBitmapInt(*top_left_corner, 0, 0);

Powered by Google App Engine
This is Rietveld 408576698