Chromium Code Reviews| Index: ash/app_list/app_list_model_view.h |
| diff --git a/ash/app_list/app_list_model_view.h b/ash/app_list/app_list_model_view.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..2687f81617afa49f61eb265c711bce16faf86218 |
| --- /dev/null |
| +++ b/ash/app_list/app_list_model_view.h |
| @@ -0,0 +1,54 @@ |
| +// 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. |
| + |
| +#ifndef ASH_APP_LIST_APP_LIST_MODEL_VIEW_H_ |
| +#define ASH_APP_LIST_APP_LIST_MODEL_VIEW_H_ |
| +#pragma once |
| + |
| +#include <string> |
|
tfarina
2012/03/01 01:10:00
nit: remove both, unused.
xiyuan
2012/03/01 19:58:47
Done.
|
| +#include <vector> |
| + |
| +#include "ash/ash_export.h" |
| +#include "ui/base/models/list_model_observer.h" |
| +#include "ui/views/controls/button/button.h" |
|
tfarina
2012/03/01 01:10:00
nit: it seems we can forward declare ButtonListene
xiyuan
2012/03/01 19:58:47
Done.
|
| +#include "ui/views/view.h" |
| + |
| +namespace views { |
| +class BoundsAnimator; |
|
tfarina
2012/03/01 01:10:00
nit: remove, unused.
xiyuan
2012/03/01 19:58:47
Done.
|
| +} |
| + |
| +namespace ash { |
| + |
| +class AppListModel; |
| + |
| +// AppListModelView displays the UI for an AppListModel. |
| +class ASH_EXPORT AppListModelView : public views::View, |
| + public ui::ListModelObserver { |
| + public: |
| + explicit AppListModelView(views::ButtonListener* listener); |
| + virtual ~AppListModelView(); |
| + |
| + void SetModel(AppListModel* model); |
| + |
| + private: |
| + // Updates from model. |
| + void Update(); |
| + |
| + // Overridden from views::View: |
| + virtual void Layout() OVERRIDE; |
| + |
| + // Overridden from ListModelObserver: |
| + virtual void ListItemsAdded(int start, int count) OVERRIDE; |
| + virtual void ListItemsRemoved(int start, int count) OVERRIDE; |
| + virtual void ListItemsChanged(int start, int count) OVERRIDE; |
| + |
| + AppListModel* model_; // Owned by parent AppListView. |
| + views::ButtonListener* listener_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(AppListModelView); |
| +}; |
| + |
| +} // namespace ash |
| + |
| +#endif // ASH_APP_LIST_APP_LIST_MODEL_VIEW_H_ |