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

Side by Side Diff: athena/activity/activity_view_manager_impl.cc

Issue 550643002: [Athena] Hack to display favicons for web activities in overview mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
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/activity/public/activity_view_manager.h" 5 #include "athena/activity/public/activity_view_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 9
10 #include "athena/activity/activity_widget_delegate.h" 10 #include "athena/activity/activity_widget_delegate.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 CHECK_EQ(this, instance); 46 CHECK_EQ(this, instance);
47 instance = NULL; 47 instance = NULL;
48 } 48 }
49 49
50 // ActivityViewManager: 50 // ActivityViewManager:
51 virtual void AddActivity(Activity* activity) OVERRIDE { 51 virtual void AddActivity(Activity* activity) OVERRIDE {
52 CHECK(activity_widgets_.end() == activity_widgets_.find(activity)); 52 CHECK(activity_widgets_.end() == activity_widgets_.find(activity));
53 views::Widget* container = CreateWidget(activity); 53 views::Widget* container = CreateWidget(activity);
54 container->AddObserver(this); 54 container->AddObserver(this);
55 activity_widgets_[activity] = container; 55 activity_widgets_[activity] = container;
56 container->UpdateWindowTitle();
57 container->Show(); 56 container->Show();
58 container->Activate(); 57 container->Activate();
59 // Call the Activity model's initializer. It might re-order the activity 58 // Call the Activity model's initializer. It might re-order the activity
60 // against others, which has to be done before before registering it to the 59 // against others, which has to be done before before registering it to the
61 // system. 60 // system.
62 activity->GetActivityViewModel()->Init(); 61 activity->GetActivityViewModel()->Init();
63 } 62 }
64 63
65 virtual void RemoveActivity(Activity* activity) OVERRIDE { 64 virtual void RemoveActivity(Activity* activity) OVERRIDE {
66 ActivityWidgetMap::iterator find = activity_widgets_.find(activity); 65 ActivityWidgetMap::iterator find = activity_widgets_.find(activity);
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 ActivityViewManager* ActivityViewManager::Get() { 109 ActivityViewManager* ActivityViewManager::Get() {
111 return instance; 110 return instance;
112 } 111 }
113 112
114 void ActivityViewManager::Shutdown() { 113 void ActivityViewManager::Shutdown() {
115 CHECK(instance); 114 CHECK(instance);
116 delete instance; 115 delete instance;
117 } 116 }
118 117
119 } // namespace athena 118 } // namespace athena
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698