| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 Activity::ActivityMediaState AppActivityProxy::GetMediaState() { | 53 Activity::ActivityMediaState AppActivityProxy::GetMediaState() { |
| 54 // This proxy has never any media playing. | 54 // This proxy has never any media playing. |
| 55 return ACTIVITY_MEDIA_STATE_NONE; | 55 return ACTIVITY_MEDIA_STATE_NONE; |
| 56 } | 56 } |
| 57 | 57 |
| 58 aura::Window* AppActivityProxy::GetWindow() { | 58 aura::Window* AppActivityProxy::GetWindow() { |
| 59 return view_->GetWidget()->GetNativeWindow(); | 59 return view_->GetWidget()->GetNativeWindow(); |
| 60 } | 60 } |
| 61 | 61 |
| 62 content::WebContents* AppActivityProxy::GetWebContents() { | 62 content::WebContents* AppActivityProxy::GetWebContents() { |
| 63 return NULL; | 63 return nullptr; |
| 64 } | 64 } |
| 65 | 65 |
| 66 void AppActivityProxy::Init() { | 66 void AppActivityProxy::Init() { |
| 67 DCHECK(replaced_activity_); | 67 DCHECK(replaced_activity_); |
| 68 // Get the content proxy to present the content. | 68 // Get the content proxy to present the content. |
| 69 content_proxy_ = replaced_activity_->GetContentProxy(); | 69 content_proxy_ = replaced_activity_->GetContentProxy(); |
| 70 WindowListProvider* window_list_provider = | 70 WindowListProvider* window_list_provider = |
| 71 WindowManager::Get()->GetWindowListProvider(); | 71 WindowManager::Get()->GetWindowListProvider(); |
| 72 window_list_provider->StackWindowBehindTo(GetWindow(), | 72 window_list_provider->StackWindowBehindTo(GetWindow(), |
| 73 replaced_activity_->GetWindow()); | 73 replaced_activity_->GetWindow()); |
| 74 // After the Init() function returns, the passed |replaced_activity_| might | 74 // After the Init() function returns, the passed |replaced_activity_| might |
| 75 // get destroyed. Since we do not need it anymore we reset it. | 75 // get destroyed. Since we do not need it anymore we reset it. |
| 76 replaced_activity_ = NULL; | 76 replaced_activity_ = nullptr; |
| 77 } | 77 } |
| 78 | 78 |
| 79 SkColor AppActivityProxy::GetRepresentativeColor() const { | 79 SkColor AppActivityProxy::GetRepresentativeColor() const { |
| 80 return color_; | 80 return color_; |
| 81 } | 81 } |
| 82 | 82 |
| 83 base::string16 AppActivityProxy::GetTitle() const { | 83 base::string16 AppActivityProxy::GetTitle() const { |
| 84 return title_; | 84 return title_; |
| 85 } | 85 } |
| 86 | 86 |
| 87 gfx::ImageSkia AppActivityProxy::GetIcon() const { | 87 gfx::ImageSkia AppActivityProxy::GetIcon() const { |
| 88 return gfx::ImageSkia(); | 88 return gfx::ImageSkia(); |
| 89 } | 89 } |
| 90 | 90 |
| 91 bool AppActivityProxy::UsesFrame() const { | 91 bool AppActivityProxy::UsesFrame() const { |
| 92 return true; | 92 return true; |
| 93 } | 93 } |
| 94 | 94 |
| 95 views::View* AppActivityProxy::GetContentsView() { | 95 views::View* AppActivityProxy::GetContentsView() { |
| 96 return view_; | 96 return view_; |
| 97 } | 97 } |
| 98 | 98 |
| 99 views::Widget* AppActivityProxy::CreateWidget() { | 99 views::Widget* AppActivityProxy::CreateWidget() { |
| 100 return NULL; | 100 return nullptr; |
| 101 } | 101 } |
| 102 | 102 |
| 103 gfx::ImageSkia AppActivityProxy::GetOverviewModeImage() { | 103 gfx::ImageSkia AppActivityProxy::GetOverviewModeImage() { |
| 104 return content_proxy_->GetContentImage(); | 104 return content_proxy_->GetContentImage(); |
| 105 } | 105 } |
| 106 | 106 |
| 107 void AppActivityProxy::PrepareContentsForOverview() { | 107 void AppActivityProxy::PrepareContentsForOverview() { |
| 108 } | 108 } |
| 109 | 109 |
| 110 void AppActivityProxy::ResetContentsView() { | 110 void AppActivityProxy::ResetContentsView() { |
| 111 } | 111 } |
| 112 | 112 |
| 113 } // namespace athena | 113 } // namespace athena |
| OLD | NEW |