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

Side by Side Diff: ui/app_list/views/apps_container_view.h

Issue 681873002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « ui/app_list/views/app_list_view_unittest.cc ('k') | ui/app_list/views/apps_grid_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_APP_LIST_VIEWS_APPS_CONTAINER_VIEW_H_ 5 #ifndef UI_APP_LIST_VIEWS_APPS_CONTAINER_VIEW_H_
6 #define UI_APP_LIST_VIEWS_APPS_CONTAINER_VIEW_H_ 6 #define UI_APP_LIST_VIEWS_APPS_CONTAINER_VIEW_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "ui/app_list/app_list_folder_item.h" 10 #include "ui/app_list/app_list_folder_item.h"
(...skipping 16 matching lines...) Expand all
27 class FolderBackgroundView; 27 class FolderBackgroundView;
28 28
29 // AppsContainerView contains a root level AppsGridView to render the root level 29 // AppsContainerView contains a root level AppsGridView to render the root level
30 // app items, and a AppListFolderView to render the app items inside the 30 // app items, and a AppListFolderView to render the app items inside the
31 // active folder. Only one if them is visible to user at any time. 31 // active folder. Only one if them is visible to user at any time.
32 class AppsContainerView : public views::View, 32 class AppsContainerView : public views::View,
33 public TopIconAnimationObserver { 33 public TopIconAnimationObserver {
34 public: 34 public:
35 AppsContainerView(AppListMainView* app_list_main_view, 35 AppsContainerView(AppListMainView* app_list_main_view,
36 AppListModel* model); 36 AppListModel* model);
37 virtual ~AppsContainerView(); 37 ~AppsContainerView() override;
38 38
39 // Shows the active folder content specified by |folder_item|. 39 // Shows the active folder content specified by |folder_item|.
40 void ShowActiveFolder(AppListFolderItem* folder_item); 40 void ShowActiveFolder(AppListFolderItem* folder_item);
41 41
42 // Shows the root level apps list. This is called when UI navigate back from 42 // Shows the root level apps list. This is called when UI navigate back from
43 // a folder view with |folder_item|. If |folder_item| is NULL skips animation. 43 // a folder view with |folder_item|. If |folder_item| is NULL skips animation.
44 void ShowApps(AppListFolderItem* folder_item); 44 void ShowApps(AppListFolderItem* folder_item);
45 45
46 // Resets the app list to a state where it shows the main grid view. This is 46 // Resets the app list to a state where it shows the main grid view. This is
47 // called when the user opens the launcher for the first time or when the user 47 // called when the user opens the launcher for the first time or when the user
48 // hides and then shows it. This is necessary because we only hide and show 48 // hides and then shows it. This is necessary because we only hide and show
49 // the launcher on Windows and Linux so we need to reset to a fresh state. 49 // the launcher on Windows and Linux so we need to reset to a fresh state.
50 void ResetForShowApps(); 50 void ResetForShowApps();
51 51
52 // Sets |drag_and_drop_host_| for the current app list in both 52 // Sets |drag_and_drop_host_| for the current app list in both
53 // app_list_folder_view_ and root level apps_grid_view_. 53 // app_list_folder_view_ and root level apps_grid_view_.
54 void SetDragAndDropHostOfCurrentAppList( 54 void SetDragAndDropHostOfCurrentAppList(
55 ApplicationDragAndDropHost* drag_and_drop_host); 55 ApplicationDragAndDropHost* drag_and_drop_host);
56 56
57 // Transits the UI from folder view to root lelve apps grid view when 57 // Transits the UI from folder view to root lelve apps grid view when
58 // re-parenting a child item of |folder_item|. 58 // re-parenting a child item of |folder_item|.
59 void ReparentFolderItemTransit(AppListFolderItem* folder_item); 59 void ReparentFolderItemTransit(AppListFolderItem* folder_item);
60 60
61 // Returns true if it is currently showing an active folder page. 61 // Returns true if it is currently showing an active folder page.
62 bool IsInFolderView() const; 62 bool IsInFolderView() const;
63 63
64 // views::View overrides: 64 // views::View overrides:
65 virtual gfx::Size GetPreferredSize() const override; 65 gfx::Size GetPreferredSize() const override;
66 virtual void Layout() override; 66 void Layout() override;
67 virtual bool OnKeyPressed(const ui::KeyEvent& event) override; 67 bool OnKeyPressed(const ui::KeyEvent& event) override;
68 68
69 // TopIconAnimationObserver overrides: 69 // TopIconAnimationObserver overrides:
70 virtual void OnTopIconAnimationsComplete() override; 70 void OnTopIconAnimationsComplete() override;
71 71
72 AppsGridView* apps_grid_view() { return apps_grid_view_; } 72 AppsGridView* apps_grid_view() { return apps_grid_view_; }
73 FolderBackgroundView* folder_background_view() { 73 FolderBackgroundView* folder_background_view() {
74 return folder_background_view_; 74 return folder_background_view_;
75 } 75 }
76 AppListFolderView* app_list_folder_view() { return app_list_folder_view_; } 76 AppListFolderView* app_list_folder_view() { return app_list_folder_view_; }
77 77
78 private: 78 private:
79 enum ShowState { 79 enum ShowState {
80 SHOW_NONE, // initial state 80 SHOW_NONE, // initial state
(...skipping 29 matching lines...) Expand all
110 110
111 size_t top_icon_animation_pending_count_; 111 size_t top_icon_animation_pending_count_;
112 112
113 DISALLOW_COPY_AND_ASSIGN(AppsContainerView); 113 DISALLOW_COPY_AND_ASSIGN(AppsContainerView);
114 }; 114 };
115 115
116 } // namespace app_list 116 } // namespace app_list
117 117
118 118
119 #endif // UI_APP_LIST_VIEWS_APPS_CONTAINER_VIEW_H_ 119 #endif // UI_APP_LIST_VIEWS_APPS_CONTAINER_VIEW_H_
OLDNEW
« no previous file with comments | « ui/app_list/views/app_list_view_unittest.cc ('k') | ui/app_list/views/apps_grid_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698