OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 ATHENA_HOME_ATHENA_START_PAGE_VIEW_H_ | 5 #ifndef ATHENA_HOME_ATHENA_START_PAGE_VIEW_H_ |
6 #define ATHENA_HOME_ATHENA_START_PAGE_VIEW_H_ | 6 #define ATHENA_HOME_ATHENA_START_PAGE_VIEW_H_ |
7 | 7 |
8 #include "athena/athena_export.h" | 8 #include "athena/athena_export.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "ui/app_list/views/search_box_view_delegate.h" | 10 #include "ui/app_list/views/search_box_view_delegate.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 private: | 38 private: |
39 friend class AthenaStartPageViewTest; | 39 friend class AthenaStartPageViewTest; |
40 | 40 |
41 static const char kViewClassName[]; | 41 static const char kViewClassName[]; |
42 | 42 |
43 // A struct which bundles the layout data of subviews. | 43 // A struct which bundles the layout data of subviews. |
44 struct LayoutData { | 44 struct LayoutData { |
45 gfx::Rect search_box; | 45 gfx::Rect search_box; |
46 gfx::Rect icons; | 46 gfx::Rect icons; |
47 gfx::Rect controls; | 47 gfx::Rect controls; |
| 48 float system_info_opacity; |
48 float logo_opacity; | 49 float logo_opacity; |
49 float background_opacity; | 50 float background_opacity; |
50 | 51 |
51 LayoutData(); | 52 LayoutData(); |
52 }; | 53 }; |
53 | 54 |
54 // Returns the bounds for |VISIBLE_BOTTOM|. | 55 // Returns the bounds for |VISIBLE_BOTTOM|. |
55 LayoutData CreateBottomBounds(int width); | 56 LayoutData CreateBottomBounds(int width); |
56 | 57 |
57 // Returns the bounds for |VISIBLE_CENTERED|. | 58 // Returns the bounds for |VISIBLE_CENTERED|. |
(...skipping 11 matching lines...) Expand all Loading... |
69 virtual void Layout() OVERRIDE; | 70 virtual void Layout() OVERRIDE; |
70 virtual bool OnKeyPressed(const ui::KeyEvent& key_event) OVERRIDE; | 71 virtual bool OnKeyPressed(const ui::KeyEvent& key_event) OVERRIDE; |
71 | 72 |
72 // app_list::SearchBoxViewDelegate: | 73 // app_list::SearchBoxViewDelegate: |
73 virtual void QueryChanged(app_list::SearchBoxView* sender) OVERRIDE; | 74 virtual void QueryChanged(app_list::SearchBoxView* sender) OVERRIDE; |
74 | 75 |
75 // Not owned. | 76 // Not owned. |
76 app_list::AppListViewDelegate* delegate_; | 77 app_list::AppListViewDelegate* delegate_; |
77 | 78 |
78 // Views are owned through its hierarchy. | 79 // Views are owned through its hierarchy. |
| 80 views::View* system_info_view_; |
79 views::View* app_icon_container_; | 81 views::View* app_icon_container_; |
80 views::View* search_box_container_; | 82 views::View* search_box_container_; |
81 views::View* control_icon_container_; | 83 views::View* control_icon_container_; |
82 views::View* logo_; | 84 views::View* logo_; |
83 app_list::SearchBoxView* search_box_view_; | 85 app_list::SearchBoxView* search_box_view_; |
84 app_list::SearchResultListView* search_results_view_; | 86 app_list::SearchResultListView* search_results_view_; |
85 | 87 |
86 // Do not use views::Background but a views::View with ui::Layer for gradient | 88 // Do not use views::Background but a views::View with ui::Layer for gradient |
87 // background opacity update and animation. | 89 // background opacity update and animation. |
88 views::View* background_; | 90 views::View* background_; |
89 | 91 |
90 // The expected height of |search_results_view_| | 92 // The expected height of |search_results_view_| |
91 int search_results_height_; | 93 int search_results_height_; |
92 | 94 |
93 // The state to specify how each of the subviews should be laid out, in the | 95 // The state to specify how each of the subviews should be laid out, in the |
94 // range of [0, 1]. 0 means fully BOTTOM state, and 1 is fully CENTERED state. | 96 // range of [0, 1]. 0 means fully BOTTOM state, and 1 is fully CENTERED state. |
95 float layout_state_; | 97 float layout_state_; |
96 | 98 |
97 base::WeakPtrFactory<AthenaStartPageView> weak_factory_; | 99 base::WeakPtrFactory<AthenaStartPageView> weak_factory_; |
98 | 100 |
99 DISALLOW_COPY_AND_ASSIGN(AthenaStartPageView); | 101 DISALLOW_COPY_AND_ASSIGN(AthenaStartPageView); |
100 }; | 102 }; |
101 | 103 |
102 } // namespace athena | 104 } // namespace athena |
103 | 105 |
104 #endif // ATHENA_HOME_ATHENA_START_PAGE_VIEW_H_ | 106 #endif // ATHENA_HOME_ATHENA_START_PAGE_VIEW_H_ |
OLD | NEW |