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

Side by Side Diff: athena/content/app_activity_unittest.cc

Issue 702473005: athena: Remove ActivityViewModel::CreateWidget(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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/app_activity_proxy.cc ('k') | athena/content/web_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_factory.h" 5 #include "athena/activity/public/activity_factory.h"
6 #include "athena/activity/public/activity_manager.h" 6 #include "athena/activity/public/activity_manager.h"
7 #include "athena/content/app_activity.h" 7 #include "athena/content/app_activity.h"
8 #include "athena/content/app_activity_registry.h" 8 #include "athena/content/app_activity_registry.h"
9 #include "athena/content/public/app_registry.h" 9 #include "athena/content/public/app_registry.h"
10 #include "athena/extensions/public/extensions_delegate.h" 10 #include "athena/extensions/public/extensions_delegate.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 current_state_ = state; 54 current_state_ = state;
55 if (state == ACTIVITY_UNLOADED) 55 if (state == ACTIVITY_UNLOADED)
56 app_activity_registry_->Unload(); 56 app_activity_registry_->Unload();
57 } 57 }
58 ActivityState GetCurrentState() override { return current_state_; } 58 ActivityState GetCurrentState() override { return current_state_; }
59 bool IsVisible() override { return true; } 59 bool IsVisible() override { return true; }
60 ActivityMediaState GetMediaState() override { 60 ActivityMediaState GetMediaState() override {
61 return Activity::ACTIVITY_MEDIA_STATE_NONE; 61 return Activity::ACTIVITY_MEDIA_STATE_NONE;
62 } 62 }
63 aura::Window* GetWindow() override { 63 aura::Window* GetWindow() override {
64 return view_->GetWidget()->GetNativeWindow(); 64 return view_->GetWidget() ? view_->GetWidget()->GetNativeWindow() : nullptr;
65 } 65 }
66 66
67 // ActivityViewModel: 67 // ActivityViewModel:
68 void Init() override {} 68 void Init() override {}
69 SkColor GetRepresentativeColor() const override { return 0; } 69 SkColor GetRepresentativeColor() const override { return 0; }
70 base::string16 GetTitle() const override { return title_; } 70 base::string16 GetTitle() const override { return title_; }
71 bool UsesFrame() const override { return true; } 71 bool UsesFrame() const override { return true; }
72 views::View* GetContentsView() override { return view_; } 72 views::View* GetContentsView() override { return view_; }
73 views::Widget* CreateWidget() override { return nullptr; }
74 gfx::ImageSkia GetOverviewModeImage() override { return gfx::ImageSkia(); } 73 gfx::ImageSkia GetOverviewModeImage() override { return gfx::ImageSkia(); }
75 74
76 private: 75 private:
77 // If known the registry which holds all activities for the associated app. 76 // If known the registry which holds all activities for the associated app.
78 AppActivityRegistry* app_activity_registry_; 77 AppActivityRegistry* app_activity_registry_;
79 78
80 // The title of the activity. 79 // The title of the activity.
81 base::string16 title_; 80 base::string16 title_;
82 81
83 // Our view. 82 // Our view.
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 // However - the restart in this test framework does not really restart and 422 // However - the restart in this test framework does not really restart and
424 // all objects should be still there.. 423 // all objects should be still there..
425 EXPECT_EQ(1, AppRegistry::Get()->NumberOfApplications()); 424 EXPECT_EQ(1, AppRegistry::Get()->NumberOfApplications());
426 EXPECT_TRUE(app_activity_registry->unloaded_activity_proxy()); 425 EXPECT_TRUE(app_activity_registry->unloaded_activity_proxy());
427 Activity::Delete(app_activity_registry->unloaded_activity_proxy()); 426 Activity::Delete(app_activity_registry->unloaded_activity_proxy());
428 EXPECT_EQ(0, AppRegistry::Get()->NumberOfApplications()); 427 EXPECT_EQ(0, AppRegistry::Get()->NumberOfApplications());
429 } 428 }
430 429
431 } // namespace test 430 } // namespace test
432 } // namespace athena 431 } // namespace athena
OLDNEW
« no previous file with comments | « athena/content/app_activity_proxy.cc ('k') | athena/content/web_activity.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698