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

Unified Diff: athena/home/athena_start_page_view.h

Issue 668443002: Changes HomeCard to fullscreen from bottom when typing a query. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | athena/home/athena_start_page_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/home/athena_start_page_view.h
diff --git a/athena/home/athena_start_page_view.h b/athena/home/athena_start_page_view.h
index d21404ddbbf5709755ecb4d36424f1ee2222eca0..f92a73f85f087b12c4bde55ab3afc23ff18fb7b0 100644
--- a/athena/home/athena_start_page_view.h
+++ b/athena/home/athena_start_page_view.h
@@ -7,6 +7,7 @@
#include "athena/athena_export.h"
#include "base/memory/weak_ptr.h"
+#include "base/observer_list.h"
#include "ui/app_list/views/search_box_view_delegate.h"
#include "ui/gfx/animation/tween.h"
#include "ui/views/view.h"
@@ -23,6 +24,11 @@ class ATHENA_EXPORT AthenaStartPageView
: public views::View,
public app_list::SearchBoxViewDelegate {
public:
+ class Observer {
+ public:
+ virtual void OnLayoutStateChanged(float new_state) = 0;
+ };
+
explicit AthenaStartPageView(app_list::AppListViewDelegate* delegate);
virtual ~AthenaStartPageView();
@@ -37,6 +43,9 @@ class ATHENA_EXPORT AthenaStartPageView
void SetLayoutStateWithAnimation(float layout_state,
gfx::Tween::Type tween_type);
+ void AddObserver(Observer* observer);
+ void RemoveObserver(Observer* observer);
+
private:
friend class AthenaStartPageViewTest;
@@ -98,6 +107,8 @@ class ATHENA_EXPORT AthenaStartPageView
// range of [0, 1]. 0 means fully BOTTOM state, and 1 is fully CENTERED state.
float layout_state_;
+ ObserverList<Observer> observers_;
+
base::WeakPtrFactory<AthenaStartPageView> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(AthenaStartPageView);
« 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