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

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

Issue 659493007: Set AppActivityProxy window name for better Ctrl+Shift+Alt+W output (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@activitystate
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 | « athena/content/app_activity_proxy.cc ('k') | 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_registry.h" 5 #include "athena/content/app_activity_registry.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.h" 8 #include "athena/content/app_activity.h"
9 #include "athena/content/app_activity_proxy.h" 9 #include "athena/content/app_activity_proxy.h"
10 #include "athena/content/public/app_registry.h" 10 #include "athena/content/public/app_registry.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 it != activity_list_.end(); ++it) { 76 it != activity_list_.end(); ++it) {
77 if ((*it)->GetCurrentState() != Activity::ACTIVITY_UNLOADED) 77 if ((*it)->GetCurrentState() != Activity::ACTIVITY_UNLOADED)
78 return; 78 return;
79 } 79 }
80 80
81 // Create an activity proxy which can be used to re-activate the app. Insert 81 // Create an activity proxy which can be used to re-activate the app. Insert
82 // the proxy then into the activity stream at the location of the (newest) 82 // the proxy then into the activity stream at the location of the (newest)
83 // current activity. 83 // current activity.
84 unloaded_activity_proxy_ = new AppActivityProxy(GetMruActivity(), this); 84 unloaded_activity_proxy_ = new AppActivityProxy(GetMruActivity(), this);
85 ActivityManager::Get()->AddActivity(unloaded_activity_proxy_); 85 ActivityManager::Get()->AddActivity(unloaded_activity_proxy_);
86 unloaded_activity_proxy_->GetWindow()->SetName("AppActivityProxy");
86 87
87 // This function can be called through an observer call. When that happens, 88 // This function can be called through an observer call. When that happens,
88 // several activities will be closed / started. That can then cause a crash. 89 // several activities will be closed / started. That can then cause a crash.
89 // We postpone therefore the activity destruction till after the observer is 90 // We postpone therefore the activity destruction till after the observer is
90 // done. 91 // done.
91 base::ThreadTaskRunnerHandle::Get()->PostTask( 92 base::ThreadTaskRunnerHandle::Get()->PostTask(
92 FROM_HERE, 93 FROM_HERE,
93 base::Bind(&AppActivityRegistry::DelayedUnload, base::Unretained(this))); 94 base::Bind(&AppActivityRegistry::DelayedUnload, base::Unretained(this)));
94 } 95 }
95 96
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 app_iterator != activity_list_.end(); ++app_iterator) { 132 app_iterator != activity_list_.end(); ++app_iterator) {
132 if (*child_iterator == (*app_iterator)->GetWindow()) 133 if (*child_iterator == (*app_iterator)->GetWindow())
133 return *app_iterator; 134 return *app_iterator;
134 } 135 }
135 } 136 }
136 NOTREACHED() << "The application does not get tracked by the mru list"; 137 NOTREACHED() << "The application does not get tracked by the mru list";
137 return nullptr; 138 return nullptr;
138 } 139 }
139 140
140 } // namespace athena 141 } // namespace athena
OLDNEW
« no previous file with comments | « athena/content/app_activity_proxy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698