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

Unified Diff: ui/aura_shell/app_list/app_list_model.h

Issue 8890049: [Aura] Implement views-based applist. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win_aura Created 9 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/aura_shell/app_list/app_list_item_view_listener.h ('k') | ui/aura_shell/app_list/app_list_model.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura_shell/app_list/app_list_model.h
diff --git a/ui/aura_shell/app_list/app_list_model.h b/ui/aura_shell/app_list/app_list_model.h
new file mode 100644
index 0000000000000000000000000000000000000000..f077d2cccf56d3063830091f03ceae71f148bc8e
--- /dev/null
+++ b/ui/aura_shell/app_list/app_list_model.h
@@ -0,0 +1,41 @@
+// Copyright (c) 2011 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_AURA_SHELL_APP_LIST_APP_LIST_MODEL_H_
+#define UI_AURA_SHELL_APP_LIST_APP_LIST_MODEL_H_
+#pragma once
+
+#include "base/basictypes.h"
+#include "ui/aura_shell/app_list/app_list_item_group_model.h"
+#include "ui/aura_shell/aura_shell_export.h"
+#include "ui/base/models/list_model.h"
+
+namespace aura_shell {
+
+// Model for AppListView. It is consisted of a list of AppListItemGroupModels,
+// which in turn owns a list of AppListItemModels.
+class AURA_SHELL_EXPORT AppListModel {
+ public:
+ AppListModel();
+ virtual ~AppListModel();
+
+ void AddGroup(AppListItemGroupModel* group);
+ AppListItemGroupModel* GetGroup(int index);
+
+ void AddObserver(ui::ListModelObserver* observer);
+ void RemoveObserver(ui::ListModelObserver* observer);
+
+ int group_count() const {
+ return groups_.item_count();
+ }
+
+ private:
+ ui::ListModel<AppListItemGroupModel> groups_;
+
+ DISALLOW_COPY_AND_ASSIGN(AppListModel);
+};
+
+} // namespace aura_shell
+
+#endif // UI_AURA_SHELL_APP_LIST_APP_LIST_MODEL_H_
« no previous file with comments | « ui/aura_shell/app_list/app_list_item_view_listener.h ('k') | ui/aura_shell/app_list/app_list_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698