| 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);
|
|
|