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

Unified Diff: ui/app_list/folder_image_source.h

Issue 687913003: app_list: Moved FolderImageSource into folder_image.cc. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ares-allapps-icon
Patch Set: Formatting (the ClangFormat rules have changed). Created 6 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 | « ui/app_list/folder_image.cc ('k') | ui/app_list/folder_image_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/folder_image_source.h
diff --git a/ui/app_list/folder_image_source.h b/ui/app_list/folder_image_source.h
deleted file mode 100644
index 6bfba4c28e53f87109350cdc36b40f85fd6786bc..0000000000000000000000000000000000000000
--- a/ui/app_list/folder_image_source.h
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright 2014 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.
-
-#ifndef UI_APP_LIST_APP_LIST_FOLDER_IMAGE_SOURCE_H_
-#define UI_APP_LIST_APP_LIST_FOLDER_IMAGE_SOURCE_H_
-
-#include <vector>
-
-#include "ui/gfx/image/canvas_image_source.h"
-
-namespace gfx {
-class Canvas;
-class ImageSkia;
-class Rect;
-class Size;
-}
-
-namespace app_list {
-
-// Generates the folder icon with the top 4 child item icons laid in 2x2 tile.
-class FolderImageSource : public gfx::CanvasImageSource {
- public:
- typedef std::vector<gfx::ImageSkia> Icons;
-
- FolderImageSource(const Icons& icons, const gfx::Size& size);
- ~FolderImageSource() override;
-
- // Gets the size of a small app icon inside the folder icon.
- static gfx::Size ItemIconSize();
-
- // Calculates the top item icons' bounds inside |folder_icon_bounds|.
- // Returns the bounds of top item icons in sequence of top left, top right,
- // bottom left, bottom right.
- static std::vector<gfx::Rect> GetTopIconsBounds(
- const gfx::Rect& folder_icon_bounds);
-
- private:
- void DrawIcon(gfx::Canvas* canvas,
- const gfx::ImageSkia& icon,
- const gfx::Size icon_size,
- int x,
- int y);
-
- // gfx::CanvasImageSource overrides:
- void Draw(gfx::Canvas* canvas) override;
-
- Icons icons_;
- gfx::Size size_;
-
- DISALLOW_COPY_AND_ASSIGN(FolderImageSource);
-};
-
-} // namespace app_list
-
-#endif // UI_APP_LIST_APP_LIST_FOLDER_ITEM_H_
« no previous file with comments | « ui/app_list/folder_image.cc ('k') | ui/app_list/folder_image_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698