Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(174)

Side by Side Diff: athena/resource_manager/resource_manager_unittest.cc

Issue 548633005: Adding overview / layer framework to Activities so that unloaded / sleeping activities can be shown… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 virtual aura::Window* GetWindow() OVERRIDE { 46 virtual aura::Window* GetWindow() OVERRIDE {
47 return view_->GetWidget()->GetNativeWindow(); 47 return view_->GetWidget()->GetNativeWindow();
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 gfx::ImageSkia GetOverviewModeImage() OVERRIDE {
57 virtual gfx::ImageSkia GetOverviewModeImage() OVERRIDE { return image_; } 57 return gfx::ImageSkia();
58 }
58 virtual void PrepareContentsForOverview() OVERRIDE {} 59 virtual void PrepareContentsForOverview() OVERRIDE {}
59 virtual void ResetContentsView() OVERRIDE {} 60 virtual void ResetContentsView() OVERRIDE {}
60 61
61 private: 62 private:
62 // The presentation values. 63 // The presentation values.
63 const base::string16 title_; 64 const base::string16 title_;
64 gfx::ImageSkia image_; 65 gfx::ImageSkia image_;
65 66
66 // The associated view. 67 // The associated view.
67 views::View* view_; 68 views::View* view_;
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 ResourceManager::Get()->SetMemoryPressureAndStopMonitoring( 258 ResourceManager::Get()->SetMemoryPressureAndStopMonitoring(
258 MemoryPressureObserver::MEMORY_PRESSURE_LOW); 259 MemoryPressureObserver::MEMORY_PRESSURE_LOW);
259 EXPECT_EQ(Activity::ACTIVITY_VISIBLE, app1->GetCurrentState()); 260 EXPECT_EQ(Activity::ACTIVITY_VISIBLE, app1->GetCurrentState());
260 EXPECT_EQ(Activity::ACTIVITY_VISIBLE, app2->GetCurrentState()); 261 EXPECT_EQ(Activity::ACTIVITY_VISIBLE, app2->GetCurrentState());
261 EXPECT_EQ(Activity::ACTIVITY_VISIBLE, app3->GetCurrentState()); 262 EXPECT_EQ(Activity::ACTIVITY_VISIBLE, app3->GetCurrentState());
262 EXPECT_NE(Activity::ACTIVITY_INVISIBLE, app4->GetCurrentState()); 263 EXPECT_NE(Activity::ACTIVITY_INVISIBLE, app4->GetCurrentState());
263 } 264 }
264 265
265 } // namespace test 266 } // namespace test
266 } // namespace athena 267 } // namespace athena
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698