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

Side by Side Diff: ash/app_list/app_list_model_view.h

Issue 9677065: ash: Update app list UI to match latest crwm. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/app_list/app_list_item_view.cc ('k') | ash/app_list/app_list_model_view.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 ASH_APP_LIST_APP_LIST_MODEL_VIEW_H_ 5 #ifndef ASH_APP_LIST_APP_LIST_MODEL_VIEW_H_
6 #define ASH_APP_LIST_APP_LIST_MODEL_VIEW_H_ 6 #define ASH_APP_LIST_APP_LIST_MODEL_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include "ui/base/models/list_model_observer.h" 9 #include "ui/base/models/list_model_observer.h"
10 #include "ui/views/view.h" 10 #include "ui/views/view.h"
(...skipping 19 matching lines...) Expand all
30 30
31 void SetSelectedItem(AppListItemView* item); 31 void SetSelectedItem(AppListItemView* item);
32 void ClearSelectedItem(AppListItemView* item); 32 void ClearSelectedItem(AppListItemView* item);
33 33
34 private: 34 private:
35 // Updates from model. 35 // Updates from model.
36 void Update(); 36 void Update();
37 37
38 AppListItemView* GetItemViewAtIndex(int index); 38 AppListItemView* GetItemViewAtIndex(int index);
39 void SetSelectedItemByIndex(int index); 39 void SetSelectedItemByIndex(int index);
40 int SetTileIconSizeAndGetMaxWidth(int icon_dimension);
41 40
42 // Overridden from views::View: 41 // Overridden from views::View:
43 virtual void Layout() OVERRIDE; 42 virtual void Layout() OVERRIDE;
44 virtual bool OnKeyPressed(const views::KeyEvent& event) OVERRIDE; 43 virtual bool OnKeyPressed(const views::KeyEvent& event) OVERRIDE;
45 virtual bool OnKeyReleased(const views::KeyEvent& event) OVERRIDE; 44 virtual bool OnKeyReleased(const views::KeyEvent& event) OVERRIDE;
46 virtual void OnPaintFocusBorder(gfx::Canvas* canvas) OVERRIDE; 45 virtual void OnPaintFocusBorder(gfx::Canvas* canvas) OVERRIDE;
47 46
48 // Overridden from ListModelObserver: 47 // Overridden from ListModelObserver:
49 virtual void ListItemsAdded(int start, int count) OVERRIDE; 48 virtual void ListItemsAdded(int start, int count) OVERRIDE;
50 virtual void ListItemsRemoved(int start, int count) OVERRIDE; 49 virtual void ListItemsRemoved(int start, int count) OVERRIDE;
51 virtual void ListItemsChanged(int start, int count) OVERRIDE; 50 virtual void ListItemsChanged(int start, int count) OVERRIDE;
52 51
53 AppListModel* model_; // Owned by parent AppListView. 52 AppListModel* model_; // Owned by parent AppListView.
54 views::ButtonListener* listener_; 53 views::ButtonListener* listener_;
55 54
56 int selected_item_index_; 55 int selected_item_index_;
57 int items_per_col_; 56 int items_per_row_;
58 57
59 DISALLOW_COPY_AND_ASSIGN(AppListModelView); 58 DISALLOW_COPY_AND_ASSIGN(AppListModelView);
60 }; 59 };
61 60
62 } // namespace ash 61 } // namespace ash
63 62
64 #endif // ASH_APP_LIST_APP_LIST_MODEL_VIEW_H_ 63 #endif // ASH_APP_LIST_APP_LIST_MODEL_VIEW_H_
OLDNEW
« no previous file with comments | « ash/app_list/app_list_item_view.cc ('k') | ash/app_list/app_list_model_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698