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

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

Issue 550643002: [Athena] Hack to display favicons for web activities in overview mode (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
« no previous file with comments | « athena/content/web_activity.cc ('k') | athena/test/sample_activity.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 virtual bool IsVisible() OVERRIDE { return is_visible_; } 44 virtual bool IsVisible() OVERRIDE { return is_visible_; }
45 virtual ActivityMediaState GetMediaState() OVERRIDE { return media_state_; } 45 virtual ActivityMediaState GetMediaState() OVERRIDE { return media_state_; }
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 gfx::ImageSkia GetIcon() const OVERRIDE { return gfx::ImageSkia(); }
54 virtual bool UsesFrame() const OVERRIDE { return true; } 55 virtual bool UsesFrame() const OVERRIDE { return true; }
55 virtual views::View* GetContentsView() OVERRIDE { return view_; } 56 virtual views::View* GetContentsView() OVERRIDE { return view_; }
56 virtual views::Widget* CreateWidget() OVERRIDE { return NULL; } 57 virtual views::Widget* CreateWidget() OVERRIDE { return NULL; }
57 virtual void CreateOverviewModeImage() OVERRIDE {} 58 virtual void CreateOverviewModeImage() OVERRIDE {}
58 virtual gfx::ImageSkia GetOverviewModeImage() OVERRIDE { return image_; } 59 virtual gfx::ImageSkia GetOverviewModeImage() OVERRIDE { return image_; }
59 virtual void PrepareContentsForOverview() OVERRIDE {} 60 virtual void PrepareContentsForOverview() OVERRIDE {}
60 virtual void ResetContentsView() OVERRIDE {} 61 virtual void ResetContentsView() OVERRIDE {}
61 62
62 private: 63 private:
63 // The presentation values. 64 // The presentation values.
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 ResourceManager::Get()->SetMemoryPressureAndStopMonitoring( 259 ResourceManager::Get()->SetMemoryPressureAndStopMonitoring(
259 MemoryPressureObserver::MEMORY_PRESSURE_LOW); 260 MemoryPressureObserver::MEMORY_PRESSURE_LOW);
260 EXPECT_EQ(Activity::ACTIVITY_VISIBLE, app1->GetCurrentState()); 261 EXPECT_EQ(Activity::ACTIVITY_VISIBLE, app1->GetCurrentState());
261 EXPECT_EQ(Activity::ACTIVITY_VISIBLE, app2->GetCurrentState()); 262 EXPECT_EQ(Activity::ACTIVITY_VISIBLE, app2->GetCurrentState());
262 EXPECT_EQ(Activity::ACTIVITY_VISIBLE, app3->GetCurrentState()); 263 EXPECT_EQ(Activity::ACTIVITY_VISIBLE, app3->GetCurrentState());
263 EXPECT_NE(Activity::ACTIVITY_INVISIBLE, app4->GetCurrentState()); 264 EXPECT_NE(Activity::ACTIVITY_INVISIBLE, app4->GetCurrentState());
264 } 265 }
265 266
266 } // namespace test 267 } // namespace test
267 } // namespace athena 268 } // namespace athena
OLDNEW
« no previous file with comments | « athena/content/web_activity.cc ('k') | athena/test/sample_activity.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698