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

Unified Diff: ui/app_list/views/app_list_background.cc

Issue 2588103004: Apply new WM shadows to app list. (Closed)
Patch Set: remove references on testing bots Created 4 years 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 | « ui/app_list/views/app_list_background.h ('k') | ui/app_list/views/app_list_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/views/app_list_background.cc
diff --git a/ui/app_list/views/app_list_background.cc b/ui/app_list/views/app_list_background.cc
deleted file mode 100644
index c22d89f47504d99fddc7850a623cc8b723aaeb77..0000000000000000000000000000000000000000
--- a/ui/app_list/views/app_list_background.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ui/app_list/views/app_list_background.h"
-
-#include "base/command_line.h"
-#include "third_party/skia/include/core/SkPaint.h"
-#include "third_party/skia/include/core/SkPath.h"
-#include "ui/app_list/app_list_constants.h"
-#include "ui/app_list/app_list_switches.h"
-#include "ui/app_list/views/contents_view.h"
-#include "ui/app_list/views/search_box_view.h"
-#include "ui/gfx/canvas.h"
-#include "ui/gfx/geometry/rect.h"
-#include "ui/gfx/skia_util.h"
-#include "ui/views/view.h"
-
-namespace app_list {
-
-AppListBackground::AppListBackground(int corner_radius)
- : corner_radius_(corner_radius) {
-}
-
-AppListBackground::~AppListBackground() {
-}
-
-void AppListBackground::Paint(gfx::Canvas* canvas,
- views::View* view) const {
- gfx::Rect bounds = view->GetContentsBounds();
-
- if (corner_radius_ > 0) {
- canvas->Save();
- SkPath path;
- // Contents corner radius is 1px smaller than border corner radius.
- SkScalar radius = SkIntToScalar(corner_radius_ - 1);
- path.addRoundRect(gfx::RectToSkRect(bounds), radius, radius);
- canvas->ClipPath(path, false);
- }
-
- SkPaint paint;
- paint.setStyle(SkPaint::kFill_Style);
-
- int contents_top = bounds.y();
- gfx::Rect contents_rect(bounds.x(),
- contents_top,
- bounds.width(),
- bounds.bottom() - contents_top);
-
- paint.setColor(kContentsBackgroundColor);
- canvas->DrawRect(contents_rect, paint);
-
- if (corner_radius_ > 0)
- canvas->Restore();
-}
-
-} // namespace app_list
« no previous file with comments | « ui/app_list/views/app_list_background.h ('k') | ui/app_list/views/app_list_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698