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

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

Issue 187483005: Extending the Views-on-Mac experiment: whole app list grid. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: still compiles r263560 + crrev/195793005 Created 6 years, 8 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 | « ui/app_list/views/apps_grid_view.h ('k') | ui/app_list/views/contents_switcher_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/views/apps_grid_view.cc
diff --git a/ui/app_list/views/apps_grid_view.cc b/ui/app_list/views/apps_grid_view.cc
index d5d70781183d77d44c987299a8886a157098628c..f3d5cc62969ad18d61ad414a8738e12eac26cd91 100644
--- a/ui/app_list/views/apps_grid_view.cc
+++ b/ui/app_list/views/apps_grid_view.cc
@@ -16,11 +16,12 @@
#include "ui/app_list/app_list_switches.h"
#include "ui/app_list/pagination_model.h"
#include "ui/app_list/views/app_list_drag_and_drop_host.h"
-#include "ui/app_list/views/app_list_folder_view.h"
+//#include "ui/app_list/views/app_list_folder_view.h"
#include "ui/app_list/views/app_list_item_view.h"
#include "ui/app_list/views/apps_grid_view_delegate.h"
+#include "ui/app_list/views/apps_grid_view_folder_delegate.h"
#include "ui/app_list/views/page_switcher.h"
-#include "ui/app_list/views/pulsing_block_view.h"
+//#include "ui/app_list/views/pulsing_block_view.h"
#include "ui/app_list/views/top_icon_animation_view.h"
#include "ui/compositor/scoped_layer_animation_settings.h"
#include "ui/events/event.h"
@@ -311,6 +312,8 @@ class SynchronousDrag : public ui::DragSourceWin {
};
#endif // defined(OS_WIN)
+const char AppsGridView::kViewClassName[] = "AppsGridView";
+
AppsGridView::AppsGridView(AppsGridViewDelegate* delegate,
PaginationModel* pagination_model)
: model_(NULL),
@@ -333,7 +336,9 @@ AppsGridView::AppsGridView(AppsGridViewDelegate* delegate,
bounds_animator_(this),
activated_item_view_(NULL),
dragging_for_reparent_item_(false) {
+#if defined(USE_AURA)
SetPaintToLayer(true);
+#endif
SetFillsBoundsOpaquely(false);
pagination_model_->AddObserver(this);
@@ -771,6 +776,10 @@ void AppsGridView::Prerender(int page_index) {
}
}
+const char* AppsGridView::GetClassName() const {
+ return kViewClassName;
+}
+
gfx::Size AppsGridView::GetPreferredSize() {
const gfx::Insets insets(GetInsets());
const gfx::Size tile_size = gfx::Size(kPreferredTileWidth,
@@ -881,6 +890,7 @@ void AppsGridView::Update() {
view_model_.Clear();
if (!item_list_ || !item_list_->item_count())
return;
+ DLOG(INFO) << "AppsGridView::Update(n=" << item_list_->item_count() << ")";
for (size_t i = 0; i < item_list_->item_count(); ++i) {
views::View* view = CreateViewForItemAtIndex(i);
view_model_.Add(view, i);
@@ -917,10 +927,13 @@ void AppsGridView::UpdatePulsingBlockViews() {
}
while (pulsing_blocks_model_.view_size() < desired) {
+ NOTREACHED();
+#ifdef FIXME
views::View* view = new PulsingBlockView(
gfx::Size(kPreferredTileWidth, kPreferredTileHeight), true);
pulsing_blocks_model_.Add(view, 0);
AddChildView(view);
+#endif
}
}
« no previous file with comments | « ui/app_list/views/apps_grid_view.h ('k') | ui/app_list/views/contents_switcher_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698