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 #include "athena/activity/public/activity.h" | 5 #include "athena/activity/public/activity.h" |
6 #include "athena/activity/public/activity_manager.h" | 6 #include "athena/activity/public/activity_manager.h" |
7 #include "athena/activity/public/activity_view_model.h" | 7 #include "athena/activity/public/activity_view_model.h" |
8 #include "athena/resource_manager/memory_pressure_notifier.h" | 8 #include "athena/resource_manager/memory_pressure_notifier.h" |
9 #include "athena/resource_manager/public/resource_manager.h" | 9 #include "athena/resource_manager/public/resource_manager.h" |
10 #include "athena/test/athena_test_base.h" | 10 #include "athena/test/athena_test_base.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 } | 48 } |
49 | 49 |
50 // ActivityViewModel overrides: | 50 // ActivityViewModel overrides: |
51 virtual void Init() OVERRIDE {} | 51 virtual void Init() OVERRIDE {} |
52 virtual SkColor GetRepresentativeColor() const OVERRIDE { return 0; } | 52 virtual SkColor GetRepresentativeColor() const OVERRIDE { return 0; } |
53 virtual base::string16 GetTitle() const OVERRIDE { return title_; } | 53 virtual base::string16 GetTitle() const OVERRIDE { return title_; } |
54 virtual bool UsesFrame() const OVERRIDE { return true; } | 54 virtual bool UsesFrame() const OVERRIDE { return true; } |
55 virtual views::View* GetContentsView() OVERRIDE { return view_; } | 55 virtual views::View* GetContentsView() OVERRIDE { return view_; } |
56 virtual void CreateOverviewModeImage() OVERRIDE {} | 56 virtual void CreateOverviewModeImage() OVERRIDE {} |
57 virtual gfx::ImageSkia GetOverviewModeImage() OVERRIDE { return image_; } | 57 virtual gfx::ImageSkia GetOverviewModeImage() OVERRIDE { return image_; } |
| 58 virtual void PrepareContentsForOverview() OVERRIDE {} |
| 59 virtual void ResetContentsView() OVERRIDE {} |
58 | 60 |
59 private: | 61 private: |
60 // The presentation values. | 62 // The presentation values. |
61 const base::string16 title_; | 63 const base::string16 title_; |
62 gfx::ImageSkia image_; | 64 gfx::ImageSkia image_; |
63 | 65 |
64 // The associated view. | 66 // The associated view. |
65 views::View* view_; | 67 views::View* view_; |
66 | 68 |
67 // The current state. | 69 // The current state. |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 ResourceManager::Get()->SetMemoryPressureAndStopMonitoring( | 257 ResourceManager::Get()->SetMemoryPressureAndStopMonitoring( |
256 MemoryPressureObserver::MEMORY_PRESSURE_LOW); | 258 MemoryPressureObserver::MEMORY_PRESSURE_LOW); |
257 EXPECT_EQ(Activity::ACTIVITY_VISIBLE, app1->GetCurrentState()); | 259 EXPECT_EQ(Activity::ACTIVITY_VISIBLE, app1->GetCurrentState()); |
258 EXPECT_EQ(Activity::ACTIVITY_VISIBLE, app2->GetCurrentState()); | 260 EXPECT_EQ(Activity::ACTIVITY_VISIBLE, app2->GetCurrentState()); |
259 EXPECT_EQ(Activity::ACTIVITY_VISIBLE, app3->GetCurrentState()); | 261 EXPECT_EQ(Activity::ACTIVITY_VISIBLE, app3->GetCurrentState()); |
260 EXPECT_NE(Activity::ACTIVITY_INVISIBLE, app4->GetCurrentState()); | 262 EXPECT_NE(Activity::ACTIVITY_INVISIBLE, app4->GetCurrentState()); |
261 } | 263 } |
262 | 264 |
263 } // namespace test | 265 } // namespace test |
264 } // namespace athena | 266 } // namespace athena |
OLD | NEW |