| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 | 55 |
| 56 aura::Window* AppActivityProxy::GetWindow() { | 56 aura::Window* AppActivityProxy::GetWindow() { |
| 57 return view_->GetWidget()->GetNativeWindow(); | 57 return view_->GetWidget()->GetNativeWindow(); |
| 58 } | 58 } |
| 59 | 59 |
| 60 void AppActivityProxy::Init() { | 60 void AppActivityProxy::Init() { |
| 61 DCHECK(replaced_activity_); | 61 DCHECK(replaced_activity_); |
| 62 // Get the content proxy to present the content. | 62 // Get the content proxy to present the content. |
| 63 content_proxy_ = replaced_activity_->GetContentProxy(GetWindow()); | 63 content_proxy_ = replaced_activity_->GetContentProxy(GetWindow()); |
| 64 WindowListProvider* window_list_provider = | 64 WindowListProvider* window_list_provider = |
| 65 WindowManager::GetInstance()->GetWindowListProvider(); | 65 WindowManager::Get()->GetWindowListProvider(); |
| 66 window_list_provider->StackWindowBehindTo(GetWindow(), | 66 window_list_provider->StackWindowBehindTo(GetWindow(), |
| 67 replaced_activity_->GetWindow()); | 67 replaced_activity_->GetWindow()); |
| 68 // Creating this object was moving the activation to this window which should | 68 // Creating this object was moving the activation to this window which should |
| 69 // not be the active window. As such we re-activate the top activity window. | 69 // not be the active window. As such we re-activate the top activity window. |
| 70 // TODO(skuhne): This should possibly move to the WindowListProvider. | 70 // TODO(skuhne): This should possibly move to the WindowListProvider. |
| 71 wm::ActivateWindow(window_list_provider->GetWindowList().back()); | 71 wm::ActivateWindow(window_list_provider->GetWindowList().back()); |
| 72 // After the Init() function returns, the passed |replaced_activity_| might | 72 // After the Init() function returns, the passed |replaced_activity_| might |
| 73 // get destroyed. Since we do not need it anymore we reset it. | 73 // get destroyed. Since we do not need it anymore we reset it. |
| 74 replaced_activity_ = NULL; | 74 replaced_activity_ = NULL; |
| 75 } | 75 } |
| (...skipping 26 matching lines...) Expand all Loading... |
| 102 return content_proxy_->GetContentImage(); | 102 return content_proxy_->GetContentImage(); |
| 103 } | 103 } |
| 104 | 104 |
| 105 void AppActivityProxy::PrepareContentsForOverview() { | 105 void AppActivityProxy::PrepareContentsForOverview() { |
| 106 } | 106 } |
| 107 | 107 |
| 108 void AppActivityProxy::ResetContentsView() { | 108 void AppActivityProxy::ResetContentsView() { |
| 109 } | 109 } |
| 110 | 110 |
| 111 } // namespace athena | 111 } // namespace athena |
| OLD | NEW |