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