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 gfx::ImageSkia GetIcon() const OVERRIDE { return gfx::ImageSkia(); } | 54 virtual gfx::ImageSkia GetIcon() const OVERRIDE { return gfx::ImageSkia(); } |
55 virtual bool UsesFrame() const OVERRIDE { return true; } | 55 virtual bool UsesFrame() const OVERRIDE { return true; } |
56 virtual views::View* GetContentsView() OVERRIDE { return view_; } | 56 virtual views::View* GetContentsView() OVERRIDE { return view_; } |
57 virtual views::Widget* CreateWidget() OVERRIDE { return NULL; } | 57 virtual views::Widget* CreateWidget() OVERRIDE { return NULL; } |
58 virtual void CreateOverviewModeImage() OVERRIDE {} | 58 virtual gfx::ImageSkia GetOverviewModeImage() OVERRIDE { |
59 virtual gfx::ImageSkia GetOverviewModeImage() OVERRIDE { return image_; } | 59 return gfx::ImageSkia(); |
| 60 } |
60 virtual void PrepareContentsForOverview() OVERRIDE {} | 61 virtual void PrepareContentsForOverview() OVERRIDE {} |
61 virtual void ResetContentsView() OVERRIDE {} | 62 virtual void ResetContentsView() OVERRIDE {} |
62 | 63 |
63 private: | 64 private: |
64 // The presentation values. | 65 // The presentation values. |
65 const base::string16 title_; | 66 const base::string16 title_; |
66 gfx::ImageSkia image_; | 67 gfx::ImageSkia image_; |
67 | 68 |
68 // The associated view. | 69 // The associated view. |
69 views::View* view_; | 70 views::View* view_; |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 ResourceManager::Get()->SetMemoryPressureAndStopMonitoring( | 260 ResourceManager::Get()->SetMemoryPressureAndStopMonitoring( |
260 MemoryPressureObserver::MEMORY_PRESSURE_LOW); | 261 MemoryPressureObserver::MEMORY_PRESSURE_LOW); |
261 EXPECT_EQ(Activity::ACTIVITY_VISIBLE, app1->GetCurrentState()); | 262 EXPECT_EQ(Activity::ACTIVITY_VISIBLE, app1->GetCurrentState()); |
262 EXPECT_EQ(Activity::ACTIVITY_VISIBLE, app2->GetCurrentState()); | 263 EXPECT_EQ(Activity::ACTIVITY_VISIBLE, app2->GetCurrentState()); |
263 EXPECT_EQ(Activity::ACTIVITY_VISIBLE, app3->GetCurrentState()); | 264 EXPECT_EQ(Activity::ACTIVITY_VISIBLE, app3->GetCurrentState()); |
264 EXPECT_NE(Activity::ACTIVITY_INVISIBLE, app4->GetCurrentState()); | 265 EXPECT_NE(Activity::ACTIVITY_INVISIBLE, app4->GetCurrentState()); |
265 } | 266 } |
266 | 267 |
267 } // namespace test | 268 } // namespace test |
268 } // namespace athena | 269 } // namespace athena |
OLD | NEW |