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

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

Issue 683463002: Do not call StackWindowFrontOf() when the AppActivity's window is already at the top (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/content/app_activity.h" 5 #include "athena/content/app_activity.h"
6 6
7 #include "athena/activity/public/activity_manager.h" 7 #include "athena/activity/public/activity_manager.h"
8 #include "athena/content/app_activity_registry.h" 8 #include "athena/content/app_activity_registry.h"
9 #include "athena/content/content_proxy.h" 9 #include "athena/content/content_proxy.h"
10 #include "athena/content/media_utils.h" 10 #include "athena/content/media_utils.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 // If the proxy was the active window, its deletion will cause a window 113 // If the proxy was the active window, its deletion will cause a window
114 // reordering since the next activatable window in line will move up to the 114 // reordering since the next activatable window in line will move up to the
115 // front. Since the application window is still hidden at this time, it is 115 // front. Since the application window is still hidden at this time, it is
116 // not yet activatable and the window behind it will move to the front. 116 // not yet activatable and the window behind it will move to the front.
117 if (wm::IsActiveWindow(app_proxy->GetWindow())) { 117 if (wm::IsActiveWindow(app_proxy->GetWindow())) {
118 // Delete the proxy window first and then move the new window to the top 118 // Delete the proxy window first and then move the new window to the top
119 // of the stack, replacing the proxy window. Note that by deleting the 119 // of the stack, replacing the proxy window. Note that by deleting the
120 // proxy the activation will change to the next (activatable) object and 120 // proxy the activation will change to the next (activatable) object and
121 // thus we have to move the window in front at the end. 121 // thus we have to move the window in front at the end.
122 Activity::Delete(app_proxy); 122 Activity::Delete(app_proxy);
123 window_list_provider->StackWindowFrontOf( 123 if (GetWindow() != window_list_provider->GetWindowList().back()) {
124 GetWindow(), 124 window_list_provider->StackWindowFrontOf(
125 window_list_provider->GetWindowList().back()); 125 GetWindow(),
126 window_list_provider->GetWindowList().back());
127 }
126 } else { 128 } else {
127 // The app window goes in front of the proxy window (we need to first 129 // The app window goes in front of the proxy window (we need to first
128 // place the window before we can delete it). 130 // place the window before we can delete it).
129 window_list_provider->StackWindowFrontOf(GetWindow(), 131 window_list_provider->StackWindowFrontOf(GetWindow(),
130 app_proxy->GetWindow()); 132 app_proxy->GetWindow());
131 Activity::Delete(app_proxy); 133 Activity::Delete(app_proxy);
132 } 134 }
133 // The proxy should now be deleted. 135 // The proxy should now be deleted.
134 DCHECK(!app_activity_registry_->unloaded_activity_proxy()); 136 DCHECK(!app_activity_registry_->unloaded_activity_proxy());
135 } 137 }
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 void AppActivity::HideContentProxy() { 237 void AppActivity::HideContentProxy() {
236 content_proxy_.reset(); 238 content_proxy_.reset();
237 } 239 }
238 240
239 void AppActivity::ShowContentProxy() { 241 void AppActivity::ShowContentProxy() {
240 if (!content_proxy_.get() && web_view_) 242 if (!content_proxy_.get() && web_view_)
241 content_proxy_.reset(new ContentProxy(web_view_)); 243 content_proxy_.reset(new ContentProxy(web_view_));
242 } 244 }
243 245
244 } // namespace athena 246 } // namespace athena
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698