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

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

Issue 626913003: Remove unused code in AppActivityProxy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months 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_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 #include "ui/wm/core/window_util.h"
15 14
16 namespace athena { 15 namespace athena {
17 16
18 AppActivityProxy::AppActivityProxy(AppActivity* replaced_activity, 17 AppActivityProxy::AppActivityProxy(AppActivity* replaced_activity,
19 AppActivityRegistry* creator) : 18 AppActivityRegistry* creator) :
20 app_activity_registry_(creator), 19 app_activity_registry_(creator),
21 title_(replaced_activity->GetActivityViewModel()->GetTitle()), 20 title_(replaced_activity->GetActivityViewModel()->GetTitle()),
22 color_(replaced_activity->GetActivityViewModel()->GetRepresentativeColor()), 21 color_(replaced_activity->GetActivityViewModel()->GetRepresentativeColor()),
23 replaced_activity_(replaced_activity), 22 replaced_activity_(replaced_activity),
24 view_(new views::View()) { 23 view_(new views::View()) {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 } 61 }
63 62
64 void AppActivityProxy::Init() { 63 void AppActivityProxy::Init() {
65 DCHECK(replaced_activity_); 64 DCHECK(replaced_activity_);
66 // Get the content proxy to present the content. 65 // Get the content proxy to present the content.
67 content_proxy_ = replaced_activity_->GetContentProxy(); 66 content_proxy_ = replaced_activity_->GetContentProxy();
68 WindowListProvider* window_list_provider = 67 WindowListProvider* window_list_provider =
69 WindowManager::Get()->GetWindowListProvider(); 68 WindowManager::Get()->GetWindowListProvider();
70 window_list_provider->StackWindowBehindTo(GetWindow(), 69 window_list_provider->StackWindowBehindTo(GetWindow(),
71 replaced_activity_->GetWindow()); 70 replaced_activity_->GetWindow());
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.
74 // TODO(skuhne): This should possibly move to the WindowListProvider.
75 wm::ActivateWindow(window_list_provider->GetWindowList().back());
Mr4D (OOO till 08-26) 2014/10/03 23:26:18 Are you sure this works now as intended? I have a
Mr4D (OOO till 08-26) 2014/10/08 14:06:28 The way it is set up at the moment you cannot remo
76 // After the Init() function returns, the passed |replaced_activity_| might 71 // After the Init() function returns, the passed |replaced_activity_| might
77 // get destroyed. Since we do not need it anymore we reset it. 72 // get destroyed. Since we do not need it anymore we reset it.
78 replaced_activity_ = NULL; 73 replaced_activity_ = NULL;
79 } 74 }
80 75
81 SkColor AppActivityProxy::GetRepresentativeColor() const { 76 SkColor AppActivityProxy::GetRepresentativeColor() const {
82 return color_; 77 return color_;
83 } 78 }
84 79
85 base::string16 AppActivityProxy::GetTitle() const { 80 base::string16 AppActivityProxy::GetTitle() const {
(...skipping 20 matching lines...) Expand all
106 return content_proxy_->GetContentImage(); 101 return content_proxy_->GetContentImage();
107 } 102 }
108 103
109 void AppActivityProxy::PrepareContentsForOverview() { 104 void AppActivityProxy::PrepareContentsForOverview() {
110 } 105 }
111 106
112 void AppActivityProxy::ResetContentsView() { 107 void AppActivityProxy::ResetContentsView() {
113 } 108 }
114 109
115 } // namespace athena 110 } // 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