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

Side by Side Diff: athena/content/app_activity_proxy.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.h ('k') | athena/content/app_activity_registry.cc » ('j') | 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_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"
11 #include "ui/aura/window.h" 11 #include "ui/aura/window.h"
12 #include "ui/views/view.h" 12 #include "ui/views/view.h"
13 #include "ui/views/widget/widget.h" 13 #include "ui/views/widget/widget.h"
14 14
15 namespace athena { 15 namespace athena {
16 16
17 AppActivityProxy::AppActivityProxy(AppActivity* replaced_activity, 17 AppActivityProxy::AppActivityProxy(AppActivity* replaced_activity,
18 AppActivityRegistry* creator) : 18 AppActivityRegistry* creator) :
19 app_activity_registry_(creator), 19 app_activity_registry_(creator),
20 title_(replaced_activity->GetActivityViewModel()->GetTitle()), 20 title_(replaced_activity->GetActivityViewModel()->GetTitle()),
21 color_(replaced_activity->GetActivityViewModel()->GetRepresentativeColor()), 21 color_(replaced_activity->GetActivityViewModel()->GetRepresentativeColor()),
22 replaced_activity_(replaced_activity), 22 replaced_activity_(replaced_activity),
23 view_(new views::View()), 23 view_(new views::View()),
24 restart_called_(false) { 24 restart_called_(false) {
25 } 25 }
26 26
27 AppActivityProxy::~AppActivityProxy() {
28 app_activity_registry_->ProxyDestroyed(this);
29 }
30
31 ActivityViewModel* AppActivityProxy::GetActivityViewModel() { 27 ActivityViewModel* AppActivityProxy::GetActivityViewModel() {
32 return this; 28 return this;
33 } 29 }
34 30
35 void AppActivityProxy::SetCurrentState(ActivityState state) { 31 void AppActivityProxy::SetCurrentState(ActivityState state) {
36 // We only restart the application when we are switching to visible, and only 32 // We only restart the application when we are switching to visible, and only
37 // once. 33 // once.
38 if (state != ACTIVITY_VISIBLE || restart_called_) 34 if (state != ACTIVITY_VISIBLE || restart_called_)
39 return; 35 return;
40 restart_called_ = true; 36 restart_called_ = true;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 gfx::ImageSkia AppActivityProxy::GetOverviewModeImage() { 99 gfx::ImageSkia AppActivityProxy::GetOverviewModeImage() {
104 return content_proxy_->GetContentImage(); 100 return content_proxy_->GetContentImage();
105 } 101 }
106 102
107 void AppActivityProxy::PrepareContentsForOverview() { 103 void AppActivityProxy::PrepareContentsForOverview() {
108 } 104 }
109 105
110 void AppActivityProxy::ResetContentsView() { 106 void AppActivityProxy::ResetContentsView() {
111 } 107 }
112 108
109 AppActivityProxy::~AppActivityProxy() {
110 app_activity_registry_->ProxyDestroyed(this);
111 }
112
113 } // namespace athena 113 } // namespace athena
OLDNEW
« no previous file with comments | « athena/content/app_activity_proxy.h ('k') | athena/content/app_activity_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698