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

Unified Diff: apps/ui/views/app_window_frame_view.cc

Issue 166443004: Add frame color option to packaged app windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 10 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 | « apps/ui/views/app_window_frame_view.h ('k') | chrome/browser/about_flags.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: apps/ui/views/app_window_frame_view.cc
diff --git a/apps/ui/views/app_window_frame_view.cc b/apps/ui/views/app_window_frame_view.cc
index a8c11c3d9c6eadabbf62f6474dfe5f24fec44fe8..d981ee7006913da6b8699201cdb2b69659100b90 100644
--- a/apps/ui/views/app_window_frame_view.cc
+++ b/apps/ui/views/app_window_frame_view.cc
@@ -51,11 +51,13 @@ AppWindowFrameView::AppWindowFrameView(NativeAppWindow* window)
AppWindowFrameView::~AppWindowFrameView() {}
void AppWindowFrameView::Init(views::Widget* frame,
+ const SkColor& frame_color,
int resize_inside_bounds_size,
int resize_outside_bounds_size,
int resize_outside_scale_for_touch,
int resize_area_corner_size) {
frame_ = frame;
+ frame_color_ = frame_color;
resize_inside_bounds_size_ = resize_inside_bounds_size;
resize_outside_bounds_size_ = resize_outside_bounds_size;
resize_area_corner_size_ = resize_area_corner_size;
@@ -156,11 +158,12 @@ int AppWindowFrameView::NonClientHitTest(const gfx::Point& point) {
return HTCLIENT;
gfx::Rect expanded_bounds = bounds();
- if (resize_outside_bounds_size_)
+ if (resize_outside_bounds_size_) {
expanded_bounds.Inset(gfx::Insets(-resize_outside_bounds_size_,
-resize_outside_bounds_size_,
-resize_outside_bounds_size_,
-resize_outside_bounds_size_));
+ }
// Points outside the (possibly expanded) bounds can be discarded.
if (!expanded_bounds.Contains(point))
return HTNOWHERE;
@@ -297,7 +300,7 @@ void AppWindowFrameView::OnPaint(gfx::Canvas* canvas) {
SkPaint paint;
paint.setAntiAlias(false);
paint.setStyle(SkPaint::kFill_Style);
- paint.setColor(SK_ColorWHITE);
+ paint.setColor(frame_color_);
gfx::Path path;
path.moveTo(0, 0);
path.lineTo(width(), 0);
« no previous file with comments | « apps/ui/views/app_window_frame_view.h ('k') | chrome/browser/about_flags.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698