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

Side by Side Diff: athena/home/athena_start_page_view.h

Issue 692643003: Moves home card background to HomeCardView. (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 | « no previous file | athena/home/athena_start_page_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 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 "base/observer_list.h" 10 #include "base/observer_list.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 static size_t GetMaxIconNumForTest(); 57 static size_t GetMaxIconNumForTest();
58 58
59 // A struct which bundles the layout data of subviews. 59 // A struct which bundles the layout data of subviews.
60 struct LayoutData { 60 struct LayoutData {
61 gfx::Rect search_box; 61 gfx::Rect search_box;
62 gfx::Rect icons; 62 gfx::Rect icons;
63 gfx::Rect controls; 63 gfx::Rect controls;
64 float system_info_opacity; 64 float system_info_opacity;
65 float logo_opacity; 65 float logo_opacity;
66 float background_opacity;
67 66
68 LayoutData(); 67 LayoutData();
69 }; 68 };
70 69
71 // Returns the bounds for |VISIBLE_BOTTOM|. 70 // Returns the bounds for |VISIBLE_BOTTOM|.
72 LayoutData CreateBottomBounds(int width); 71 LayoutData CreateBottomBounds(int width);
73 72
74 // Returns the bounds for |VISIBLE_CENTERED|. 73 // Returns the bounds for |VISIBLE_CENTERED|.
75 LayoutData CreateCenteredBounds(int width); 74 LayoutData CreateCenteredBounds(int width);
76 75
(...skipping 26 matching lines...) Expand all
103 102
104 // Views are owned through its hierarchy. 103 // Views are owned through its hierarchy.
105 views::View* system_info_view_; 104 views::View* system_info_view_;
106 views::View* app_icon_container_; 105 views::View* app_icon_container_;
107 views::View* search_box_container_; 106 views::View* search_box_container_;
108 views::View* control_icon_container_; 107 views::View* control_icon_container_;
109 views::View* logo_; 108 views::View* logo_;
110 app_list::SearchBoxView* search_box_view_; 109 app_list::SearchBoxView* search_box_view_;
111 app_list::SearchResultListView* search_results_view_; 110 app_list::SearchResultListView* search_results_view_;
112 111
113 // Do not use views::Background but a views::View with ui::Layer for gradient
114 // background opacity update and animation.
115 views::View* background_;
116
117 // The expected height of |search_results_view_| 112 // The expected height of |search_results_view_|
118 int search_results_height_; 113 int search_results_height_;
119 114
120 // The state to specify how each of the subviews should be laid out, in the 115 // The state to specify how each of the subviews should be laid out, in the
121 // range of [0, 1]. 0 means fully BOTTOM state, and 1 is fully CENTERED state. 116 // range of [0, 1]. 0 means fully BOTTOM state, and 1 is fully CENTERED state.
122 float layout_state_; 117 float layout_state_;
123 118
124 ObserverList<Observer> observers_; 119 ObserverList<Observer> observers_;
125 120
126 base::WeakPtrFactory<AthenaStartPageView> weak_factory_; 121 base::WeakPtrFactory<AthenaStartPageView> weak_factory_;
127 122
128 DISALLOW_COPY_AND_ASSIGN(AthenaStartPageView); 123 DISALLOW_COPY_AND_ASSIGN(AthenaStartPageView);
129 }; 124 };
130 125
131 } // namespace athena 126 } // namespace athena
132 127
133 #endif // ATHENA_HOME_ATHENA_START_PAGE_VIEW_H_ 128 #endif // ATHENA_HOME_ATHENA_START_PAGE_VIEW_H_
OLDNEW
« no previous file with comments | « no previous file | athena/home/athena_start_page_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698