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

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

Issue 310243003: Let ActivityManager delete the remaining activities on shutdown. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « athena/athena.gyp ('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/web_activity.h" 5 #include "athena/content/web_activity.h"
6 6
7 #include "athena/activity/public/activity_manager.h" 7 #include "athena/activity/public/activity_manager.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "content/public/browser/web_contents.h" 9 #include "content/public/browser/web_contents.h"
10 10
11 namespace athena { 11 namespace athena {
12 12
13 WebActivity::WebActivity(content::WebContents* contents) 13 WebActivity::WebActivity(content::WebContents* contents)
14 : content::WebContentsObserver(contents) { 14 : content::WebContentsObserver(contents) {
15 } 15 }
16 16
17 WebActivity::~WebActivity() { 17 WebActivity::~WebActivity() {
18 ActivityManager::Get()->RemoveActivity(this);
19 } 18 }
20 19
21 ActivityViewModel* WebActivity::GetActivityViewModel() { 20 ActivityViewModel* WebActivity::GetActivityViewModel() {
22 return this; 21 return this;
23 } 22 }
24 23
25 SkColor WebActivity::GetRepresentativeColor() { 24 SkColor WebActivity::GetRepresentativeColor() {
26 // TODO(sad): Compute the color from the favicon. 25 // TODO(sad): Compute the color from the favicon.
27 return SK_ColorGRAY; 26 return SK_ColorGRAY;
28 } 27 }
(...skipping 10 matching lines...) Expand all
39 bool explicit_set) { 38 bool explicit_set) {
40 ActivityManager::Get()->UpdateActivity(this); 39 ActivityManager::Get()->UpdateActivity(this);
41 } 40 }
42 41
43 void WebActivity::DidUpdateFaviconURL( 42 void WebActivity::DidUpdateFaviconURL(
44 const std::vector<content::FaviconURL>& candidates) { 43 const std::vector<content::FaviconURL>& candidates) {
45 ActivityManager::Get()->UpdateActivity(this); 44 ActivityManager::Get()->UpdateActivity(this);
46 } 45 }
47 46
48 } // namespace athena 47 } // namespace athena
OLDNEW
« no previous file with comments | « athena/athena.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698