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

Side by Side Diff: ui/app_list/app_list_view.h

Issue 10534051: app_list: Add transition for apps grid and search results. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 6 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 | « ui/app_list/app_list_bubble_border.cc ('k') | ui/app_list/app_list_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 UI_APP_LIST_APP_LIST_VIEW_H_ 5 #ifndef UI_APP_LIST_APP_LIST_VIEW_H_
6 #define UI_APP_LIST_APP_LIST_VIEW_H_ 6 #define UI_APP_LIST_APP_LIST_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "ui/app_list/app_list_export.h" 10 #include "ui/app_list/app_list_export.h"
11 #include "ui/app_list/search_box_view_delegate.h" 11 #include "ui/app_list/search_box_view_delegate.h"
12 #include "ui/app_list/search_result_list_view_delegate.h" 12 #include "ui/app_list/search_result_list_view_delegate.h"
13 #include "ui/views/bubble/bubble_delegate.h" 13 #include "ui/views/bubble/bubble_delegate.h"
14 #include "ui/views/controls/button/button.h" 14 #include "ui/views/controls/button/button.h"
15 15
16 namespace views {
17 class View;
18 }
19
20 namespace app_list { 16 namespace app_list {
21 17
22 class AppListBubbleBorder; 18 class AppListBubbleBorder;
23 class AppListModel; 19 class AppListModel;
24 class AppsGridView;
25 class AppListViewDelegate; 20 class AppListViewDelegate;
26 class PageSwitcher; 21 class ContentsView;
27 class PaginationModel; 22 class PaginationModel;
28 class SearchBoxView; 23 class SearchBoxView;
29 class SearchResultListView;
30 24
31 // AppListView is the top-level view and controller of app list UI. It creates 25 // AppListView is the top-level view and controller of app list UI. It creates
32 // and hosts a AppsGridView and passes AppListModel to it for display. 26 // and hosts a AppsGridView and passes AppListModel to it for display.
33 class APP_LIST_EXPORT AppListView : public views::BubbleDelegateView, 27 class APP_LIST_EXPORT AppListView : public views::BubbleDelegateView,
34 public views::ButtonListener, 28 public views::ButtonListener,
35 public SearchBoxViewDelegate, 29 public SearchBoxViewDelegate,
36 public SearchResultListViewDelegate { 30 public SearchResultListViewDelegate {
37 public: 31 public:
38 // Takes ownership of |delegate|. 32 // Takes ownership of |delegate|.
39 explicit AppListView(AppListViewDelegate* delegate); 33 explicit AppListView(AppListViewDelegate* delegate);
(...skipping 12 matching lines...) Expand all
52 void UpdateBounds(); 46 void UpdateBounds();
53 47
54 private: 48 private:
55 // Creates models to use. 49 // Creates models to use.
56 void CreateModel(); 50 void CreateModel();
57 51
58 // Overridden from views::WidgetDelegateView: 52 // Overridden from views::WidgetDelegateView:
59 virtual views::View* GetInitiallyFocusedView() OVERRIDE; 53 virtual views::View* GetInitiallyFocusedView() OVERRIDE;
60 54
61 // Overridden from views::View: 55 // Overridden from views::View:
62 virtual gfx::Size GetPreferredSize() OVERRIDE;
63 virtual void Layout() OVERRIDE;
64 virtual bool OnKeyPressed(const views::KeyEvent& event) OVERRIDE; 56 virtual bool OnKeyPressed(const views::KeyEvent& event) OVERRIDE;
65 57
66 // Overridden from views::ButtonListener: 58 // Overridden from views::ButtonListener:
67 virtual void ButtonPressed(views::Button* sender, 59 virtual void ButtonPressed(views::Button* sender,
68 const views::Event& event) OVERRIDE; 60 const views::Event& event) OVERRIDE;
69 61
70 // Overridden from views::BubbleDelegate: 62 // Overridden from views::BubbleDelegate:
71 virtual gfx::Rect GetBubbleBounds() OVERRIDE; 63 virtual gfx::Rect GetBubbleBounds() OVERRIDE;
72 64
73 // Overridden from SearchBoxViewDelegate: 65 // Overridden from SearchBoxViewDelegate:
74 virtual void QueryChanged(SearchBoxView* sender) OVERRIDE; 66 virtual void QueryChanged(SearchBoxView* sender) OVERRIDE;
75 67
76 // Overridden from SearchResultListViewDelegate: 68 // Overridden from SearchResultListViewDelegate:
77 virtual void OpenResult(const SearchResult& result, 69 virtual void OpenResult(const SearchResult& result,
78 int event_flags) OVERRIDE; 70 int event_flags) OVERRIDE;
79 71
80 scoped_ptr<AppListModel> model_; 72 scoped_ptr<AppListModel> model_;
81 scoped_ptr<AppListViewDelegate> delegate_; 73 scoped_ptr<AppListViewDelegate> delegate_;
82 74
83 // PaginationModel for model view and page switcher. 75 // PaginationModel for apps grid view and page switcher.
84 scoped_ptr<PaginationModel> pagination_model_; 76 scoped_ptr<PaginationModel> pagination_model_;
85 77
86 AppListBubbleBorder* bubble_border_; // Owned by views hierarchy. 78 AppListBubbleBorder* bubble_border_; // Owned by views hierarchy.
87
88 AppsGridView* apps_grid_view_; // Owned by views hierarchy.
89 PageSwitcher* page_switcher_view_; // Owned by views hierarchy.
90 SearchBoxView* search_box_view_; // Owned by views hierarchy. 79 SearchBoxView* search_box_view_; // Owned by views hierarchy.
91 SearchResultListView* search_results_view_; // Owned by views hierarchy. 80 ContentsView* contents_view_; // Owned by views hierarchy.
92 81
93 DISALLOW_COPY_AND_ASSIGN(AppListView); 82 DISALLOW_COPY_AND_ASSIGN(AppListView);
94 }; 83 };
95 84
96 } // namespace app_list 85 } // namespace app_list
97 86
98 #endif // UI_APP_LIST_APP_LIST_VIEW_H_ 87 #endif // UI_APP_LIST_APP_LIST_VIEW_H_
OLDNEW
« no previous file with comments | « ui/app_list/app_list_bubble_border.cc ('k') | ui/app_list/app_list_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698