| 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_HOME_CARD_IMPL_H_ | 5 #ifndef ATHENA_HOME_HOME_CARD_IMPL_H_ |
| 6 #define ATHENA_HOME_HOME_CARD_IMPL_H_ | 6 #define ATHENA_HOME_HOME_CARD_IMPL_H_ |
| 7 | 7 |
| 8 #include "athena/athena_export.h" | 8 #include "athena/athena_export.h" |
| 9 #include "athena/home/home_card_gesture_manager.h" | 9 #include "athena/home/home_card_gesture_manager.h" |
| 10 #include "athena/home/public/home_card.h" | 10 #include "athena/home/public/home_card.h" |
| 11 #include "athena/home/public/search_controller_factory.h" | 11 #include "athena/home/public/search_controller_factory.h" |
| 12 #include "athena/input/public/accelerator_manager.h" | 12 #include "athena/input/public/accelerator_manager.h" |
| 13 #include "athena/wm/public/window_manager_observer.h" | 13 #include "athena/wm/public/window_manager_observer.h" |
| 14 #include "ui/wm/public/activation_change_observer.h" | |
| 15 | 14 |
| 16 namespace aura { | 15 namespace aura { |
| 17 class Window; | 16 class Window; |
| 18 | |
| 19 namespace client { | |
| 20 class ActivationClient; | |
| 21 } | |
| 22 } | 17 } |
| 23 | 18 |
| 24 namespace gfx { | 19 namespace gfx { |
| 25 class Rect; | 20 class Rect; |
| 26 } | 21 } |
| 27 | 22 |
| 28 namespace ui { | 23 namespace ui { |
| 29 class LayerOwner; | 24 class LayerOwner; |
| 30 } | 25 } |
| 31 | 26 |
| 32 namespace views { | 27 namespace views { |
| 33 class Widget; | 28 class Widget; |
| 34 } | 29 } |
| 35 | 30 |
| 36 namespace athena { | 31 namespace athena { |
| 37 class AppModelBuilder; | 32 class AppModelBuilder; |
| 38 class AppListViewDelegate; | 33 class AppListViewDelegate; |
| 39 class HomeCardLayoutManager; | 34 class HomeCardLayoutManager; |
| 40 class HomeCardView; | 35 class HomeCardView; |
| 41 | 36 |
| 42 class ATHENA_EXPORT HomeCardImpl | 37 class ATHENA_EXPORT HomeCardImpl : public HomeCard, |
| 43 : public HomeCard, | 38 public AcceleratorHandler, |
| 44 public AcceleratorHandler, | 39 public HomeCardGestureManager::Delegate, |
| 45 public HomeCardGestureManager::Delegate, | 40 public WindowManagerObserver { |
| 46 public WindowManagerObserver, | |
| 47 public aura::client::ActivationChangeObserver { | |
| 48 public: | 41 public: |
| 49 HomeCardImpl(scoped_ptr<AppModelBuilder> model_builder, | 42 HomeCardImpl(scoped_ptr<AppModelBuilder> model_builder, |
| 50 scoped_ptr<SearchControllerFactory> search_factory); | 43 scoped_ptr<SearchControllerFactory> search_factory); |
| 51 virtual ~HomeCardImpl(); | 44 virtual ~HomeCardImpl(); |
| 52 | 45 |
| 53 void Init(); | 46 void Init(); |
| 54 | 47 |
| 55 aura::Window* GetHomeCardWindowForTest() const; | 48 aura::Window* GetHomeCardWindowForTest() const; |
| 56 | 49 |
| 57 private: | 50 private: |
| (...skipping 20 matching lines...) Expand all Loading... |
| 78 HomeCard::State from_state, | 71 HomeCard::State from_state, |
| 79 HomeCard::State to_state, | 72 HomeCard::State to_state, |
| 80 float progress) override; | 73 float progress) override; |
| 81 | 74 |
| 82 // WindowManagerObserver: | 75 // WindowManagerObserver: |
| 83 virtual void OnOverviewModeEnter() override; | 76 virtual void OnOverviewModeEnter() override; |
| 84 virtual void OnOverviewModeExit() override; | 77 virtual void OnOverviewModeExit() override; |
| 85 virtual void OnSplitViewModeEnter() override; | 78 virtual void OnSplitViewModeEnter() override; |
| 86 virtual void OnSplitViewModeExit() override; | 79 virtual void OnSplitViewModeExit() override; |
| 87 | 80 |
| 88 // aura::client::ActivationChangeObserver: | |
| 89 virtual void OnWindowActivated(aura::Window* gained_active, | |
| 90 aura::Window* lost_active) override; | |
| 91 | |
| 92 scoped_ptr<AppModelBuilder> model_builder_; | 81 scoped_ptr<AppModelBuilder> model_builder_; |
| 93 scoped_ptr<SearchControllerFactory> search_factory_; | 82 scoped_ptr<SearchControllerFactory> search_factory_; |
| 94 | 83 |
| 95 HomeCard::State state_; | 84 HomeCard::State state_; |
| 96 | 85 |
| 97 // original_state_ is the state which the home card should go back to after | 86 // original_state_ is the state which the home card should go back to after |
| 98 // the virtual keyboard is hidden. | 87 // the virtual keyboard is hidden. |
| 99 HomeCard::State original_state_; | 88 HomeCard::State original_state_; |
| 100 | 89 |
| 101 views::Widget* home_card_widget_; | 90 views::Widget* home_card_widget_; |
| 102 HomeCardView* home_card_view_; | 91 HomeCardView* home_card_view_; |
| 103 scoped_ptr<AppListViewDelegate> view_delegate_; | 92 scoped_ptr<AppListViewDelegate> view_delegate_; |
| 104 HomeCardLayoutManager* layout_manager_; | 93 HomeCardLayoutManager* layout_manager_; |
| 105 aura::client::ActivationClient* activation_client_; // Not owned | |
| 106 scoped_ptr<ui::LayerOwner> minimized_home_; | 94 scoped_ptr<ui::LayerOwner> minimized_home_; |
| 107 | 95 |
| 108 DISALLOW_COPY_AND_ASSIGN(HomeCardImpl); | 96 DISALLOW_COPY_AND_ASSIGN(HomeCardImpl); |
| 109 }; | 97 }; |
| 110 | 98 |
| 111 } // namespace athena | 99 } // namespace athena |
| 112 | 100 |
| 113 #endif // ATHENA_HOME_HOME_CARD_IMPL_H_ | 101 #endif // ATHENA_HOME_HOME_CARD_IMPL_H_ |
| OLD | NEW |