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

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

Issue 558243002: V2 app support step2 : Use NativeAppWindow for Activity's window. (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_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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 return true; 61 return true;
62 } 62 }
63 virtual ActivityMediaState GetMediaState() OVERRIDE { 63 virtual ActivityMediaState GetMediaState() OVERRIDE {
64 return Activity::ACTIVITY_MEDIA_STATE_NONE; 64 return Activity::ACTIVITY_MEDIA_STATE_NONE;
65 } 65 }
66 virtual aura::Window* GetWindow() OVERRIDE { 66 virtual aura::Window* GetWindow() OVERRIDE {
67 return view_->GetWidget()->GetNativeWindow(); 67 return view_->GetWidget()->GetNativeWindow();
68 } 68 }
69 69
70 // AppActivity: 70 // AppActivity:
71 virtual content::WebContents* GetWebContents() OVERRIDE { return NULL; } 71 virtual views::WebView* GetWebView() OVERRIDE { return NULL; }
72 72
73 // ActivityViewModel: 73 // ActivityViewModel:
74 virtual void Init() OVERRIDE {} 74 virtual void Init() OVERRIDE {}
75 virtual SkColor GetRepresentativeColor() const OVERRIDE { return 0; } 75 virtual SkColor GetRepresentativeColor() const OVERRIDE { return 0; }
76 virtual base::string16 GetTitle() const OVERRIDE { return title_; } 76 virtual base::string16 GetTitle() const OVERRIDE { return title_; }
77 virtual bool UsesFrame() const OVERRIDE { return true; } 77 virtual bool UsesFrame() const OVERRIDE { return true; }
78 virtual views::View* GetContentsView() OVERRIDE { return view_; } 78 virtual views::View* GetContentsView() OVERRIDE { return view_; }
79 virtual views::Widget* CreateWidget() OVERRIDE { return NULL; }
79 virtual void CreateOverviewModeImage() OVERRIDE {} 80 virtual void CreateOverviewModeImage() OVERRIDE {}
80 81
81 private: 82 private:
82 // If known the registry which holds all activities for the associated app. 83 // If known the registry which holds all activities for the associated app.
83 AppActivityRegistry* app_activity_registry_; 84 AppActivityRegistry* app_activity_registry_;
84 85
85 // The title of the activity. 86 // The title of the activity.
86 base::string16 title_; 87 base::string16 title_;
87 88
88 // Our view. 89 // Our view.
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 // However - the restart in this test framework does not really restart and 417 // However - the restart in this test framework does not really restart and
417 // all objects should be still there.. 418 // all objects should be still there..
418 EXPECT_EQ(1, AppRegistry::Get()->NumberOfApplications()); 419 EXPECT_EQ(1, AppRegistry::Get()->NumberOfApplications());
419 EXPECT_TRUE(app_activity_registry->unloaded_activity_proxy()); 420 EXPECT_TRUE(app_activity_registry->unloaded_activity_proxy());
420 Activity::Delete(app_activity_registry->unloaded_activity_proxy()); 421 Activity::Delete(app_activity_registry->unloaded_activity_proxy());
421 EXPECT_EQ(0, AppRegistry::Get()->NumberOfApplications()); 422 EXPECT_EQ(0, AppRegistry::Get()->NumberOfApplications());
422 } 423 }
423 424
424 } // namespace test 425 } // namespace test
425 } // namespace athena 426 } // namespace athena
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698