| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef ATHENA_TEST_BASE_SAMPLE_ACTIVITY_H_ | |
| 6 #define ATHENA_TEST_BASE_SAMPLE_ACTIVITY_H_ | |
| 7 | |
| 8 #include "athena/activity/public/activity.h" | |
| 9 #include "athena/activity/public/activity_view_model.h" | |
| 10 #include "base/memory/scoped_ptr.h" | |
| 11 | |
| 12 namespace gfx { | |
| 13 class ImageSkia; | |
| 14 } | |
| 15 | |
| 16 namespace athena { | |
| 17 class AcceleratorManager; | |
| 18 | |
| 19 namespace test { | |
| 20 | |
| 21 class SampleActivity : public Activity, | |
| 22 public ActivityViewModel { | |
| 23 public: | |
| 24 SampleActivity(SkColor color, | |
| 25 SkColor contents_color, | |
| 26 const base::string16& title); | |
| 27 ~SampleActivity() override; | |
| 28 | |
| 29 // athena::Activity: | |
| 30 athena::ActivityViewModel* GetActivityViewModel() override; | |
| 31 void SetCurrentState(Activity::ActivityState state) override; | |
| 32 ActivityState GetCurrentState() override; | |
| 33 bool IsVisible() override; | |
| 34 ActivityMediaState GetMediaState() override; | |
| 35 aura::Window* GetWindow() override; | |
| 36 content::WebContents* GetWebContents() override; | |
| 37 | |
| 38 // athena::ActivityViewModel: | |
| 39 void Init() override; | |
| 40 SkColor GetRepresentativeColor() const override; | |
| 41 base::string16 GetTitle() const override; | |
| 42 gfx::ImageSkia GetIcon() const override; | |
| 43 void SetActivityView(ActivityView* activity_view) override; | |
| 44 bool UsesFrame() const override; | |
| 45 views::View* GetContentsView() override; | |
| 46 gfx::ImageSkia GetOverviewModeImage() override; | |
| 47 void PrepareContentsForOverview() override; | |
| 48 void ResetContentsView() override; | |
| 49 | |
| 50 private: | |
| 51 SkColor color_; | |
| 52 SkColor contents_color_; | |
| 53 base::string16 title_; | |
| 54 views::View* contents_view_; | |
| 55 | |
| 56 // The current state for this activity. | |
| 57 ActivityState current_state_; | |
| 58 | |
| 59 // This is to emulate real implementation. | |
| 60 scoped_ptr<AcceleratorManager> accelerator_manager_; | |
| 61 | |
| 62 DISALLOW_COPY_AND_ASSIGN(SampleActivity); | |
| 63 }; | |
| 64 | |
| 65 } // namespace test | |
| 66 } // namespace athena | |
| 67 | |
| 68 #endif // ATHENA_TEST_BASE_SAMPLE_ACTIVITY_H_ | |
| OLD | NEW |