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/content/app_activity_proxy.h" | 5 #include "athena/content/app_activity_proxy.h" |
6 | 6 |
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/wm/public/window_list_provider.h" | 9 #include "athena/wm/public/window_list_provider.h" |
10 #include "athena/wm/public/window_manager.h" | 10 #include "athena/wm/public/window_manager.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 bool AppActivityProxy::IsVisible() { | 45 bool AppActivityProxy::IsVisible() { |
46 return false; | 46 return false; |
47 } | 47 } |
48 | 48 |
49 Activity::ActivityMediaState AppActivityProxy::GetMediaState() { | 49 Activity::ActivityMediaState AppActivityProxy::GetMediaState() { |
50 // This proxy has never any media playing. | 50 // This proxy has never any media playing. |
51 return ACTIVITY_MEDIA_STATE_NONE; | 51 return ACTIVITY_MEDIA_STATE_NONE; |
52 } | 52 } |
53 | 53 |
54 aura::Window* AppActivityProxy::GetWindow() { | 54 aura::Window* AppActivityProxy::GetWindow() { |
55 return view_->GetWidget()->GetNativeWindow(); | 55 return view_->GetWidget() ? view_->GetWidget()->GetNativeWindow() : nullptr; |
56 } | 56 } |
57 | 57 |
58 content::WebContents* AppActivityProxy::GetWebContents() { | 58 content::WebContents* AppActivityProxy::GetWebContents() { |
59 return nullptr; | 59 return nullptr; |
60 } | 60 } |
61 | 61 |
62 void AppActivityProxy::Init() { | 62 void AppActivityProxy::Init() { |
63 DCHECK(replaced_activity_); | 63 DCHECK(replaced_activity_); |
64 // Get the content proxy to present the content. | 64 // Get the content proxy to present the content. |
65 content_proxy_ = replaced_activity_->GetContentProxy(); | 65 content_proxy_ = replaced_activity_->GetContentProxy(); |
(...skipping 19 matching lines...) Expand all Loading... |
85 } | 85 } |
86 | 86 |
87 bool AppActivityProxy::UsesFrame() const { | 87 bool AppActivityProxy::UsesFrame() const { |
88 return true; | 88 return true; |
89 } | 89 } |
90 | 90 |
91 views::View* AppActivityProxy::GetContentsView() { | 91 views::View* AppActivityProxy::GetContentsView() { |
92 return view_; | 92 return view_; |
93 } | 93 } |
94 | 94 |
95 views::Widget* AppActivityProxy::CreateWidget() { | |
96 return nullptr; | |
97 } | |
98 | |
99 gfx::ImageSkia AppActivityProxy::GetOverviewModeImage() { | 95 gfx::ImageSkia AppActivityProxy::GetOverviewModeImage() { |
100 return content_proxy_->GetContentImage(); | 96 return content_proxy_->GetContentImage(); |
101 } | 97 } |
102 | 98 |
103 void AppActivityProxy::PrepareContentsForOverview() { | 99 void AppActivityProxy::PrepareContentsForOverview() { |
104 } | 100 } |
105 | 101 |
106 void AppActivityProxy::ResetContentsView() { | 102 void AppActivityProxy::ResetContentsView() { |
107 } | 103 } |
108 | 104 |
109 AppActivityProxy::~AppActivityProxy() { | 105 AppActivityProxy::~AppActivityProxy() { |
110 app_activity_registry_->ProxyDestroyed(this); | 106 app_activity_registry_->ProxyDestroyed(this); |
111 } | 107 } |
112 | 108 |
113 } // namespace athena | 109 } // namespace athena |
OLD | NEW |