OLD | NEW |
(Empty) | |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef UI_APP_LIST_VIEWS_APP_LIST_FOLDER_VIEW_H_ |
| 6 #define UI_APP_LIST_VIEWS_APP_LIST_FOLDER_VIEW_H_ |
| 7 |
| 8 #include "ui/app_list/views/folder_header_view.h" |
| 9 #include "ui/app_list/views/folder_header_view_delegate.h" |
| 10 #include "ui/views/controls/button/button.h" |
| 11 #include "ui/views/view.h" |
| 12 |
| 13 namespace content { |
| 14 class WebContents; |
| 15 } |
| 16 |
| 17 namespace views { |
| 18 class ViewModel; |
| 19 } |
| 20 |
| 21 namespace app_list { |
| 22 |
| 23 class AppsContainerView; |
| 24 class AppsGridView; |
| 25 class AppListFolderItem; |
| 26 class AppListMainView; |
| 27 class AppListModel; |
| 28 class FolderHeaderView; |
| 29 class PaginationModel; |
| 30 |
| 31 class AppListFolderView : public views::View, |
| 32 public FolderHeaderViewDelegate { |
| 33 public: |
| 34 AppListFolderView(AppsContainerView* container_view, |
| 35 AppListModel* model, |
| 36 AppListMainView* app_list_main_view, |
| 37 content::WebContents* start_page_contents); |
| 38 virtual ~AppListFolderView(); |
| 39 |
| 40 void SetAppListFolderItem(AppListFolderItem* folder); |
| 41 |
| 42 // Overridden from views::View: |
| 43 virtual gfx::Size GetPreferredSize() OVERRIDE; |
| 44 virtual void Layout() OVERRIDE; |
| 45 |
| 46 private: |
| 47 void CalculateIdealBounds(); |
| 48 |
| 49 // Overridden from FolderHeaderViewDelegate: |
| 50 virtual void NavigateBack(AppListFolderItem* item, |
| 51 const ui::Event& event_flags) OVERRIDE; |
| 52 |
| 53 AppsContainerView* container_view_; // Not owned. |
| 54 FolderHeaderView* folder_header_view_; // Owned by views hierarchy. |
| 55 AppsGridView* items_grid_view_; // Owned by the views hierarchy. |
| 56 |
| 57 scoped_ptr<views::ViewModel> view_model_; |
| 58 |
| 59 AppListFolderItem* folder_item_; // Not owned. |
| 60 |
| 61 scoped_ptr<PaginationModel> pagination_model_; |
| 62 |
| 63 DISALLOW_COPY_AND_ASSIGN(AppListFolderView); |
| 64 }; |
| 65 |
| 66 } // namespace app_list |
| 67 |
| 68 #endif // UI_APP_LIST_VIEWS_APP_LIST_FOLDER_VIEW_H_ |
| 69 |
| 70 |
OLD | NEW |