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

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

Issue 633623002: Handle transient children as a part of transient parent (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
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/content_activity_factory.h" 5 #include "athena/content/content_activity_factory.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/web_activity.h" 9 #include "athena/content/web_activity.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "ui/aura/window.h"
11 12
12 namespace athena { 13 namespace athena {
13 14
14 ContentActivityFactory::ContentActivityFactory() { 15 ContentActivityFactory::ContentActivityFactory() {
15 } 16 }
16 17
17 ContentActivityFactory::~ContentActivityFactory() {} 18 ContentActivityFactory::~ContentActivityFactory() {}
18 19
19 Activity* ContentActivityFactory::CreateWebActivity( 20 Activity* ContentActivityFactory::CreateWebActivity(
20 content::BrowserContext* browser_context, 21 content::BrowserContext* browser_context,
21 const base::string16& title, 22 const base::string16& title,
22 const GURL& url) { 23 const GURL& url) {
23 Activity* activity = new WebActivity(browser_context, title, url); 24 Activity* activity = new WebActivity(browser_context, title, url);
24 ActivityManager::Get()->AddActivity(activity); 25 ActivityManager::Get()->AddActivity(activity);
26 activity->GetWindow()->SetName("WebActivity");
Mr4D (OOO till 08-26) 2014/10/08 17:15:36 You might consider putting this into a separate CL
oshima 2014/10/08 19:05:30 sure
25 return activity; 27 return activity;
26 } 28 }
27 29
28 Activity* ContentActivityFactory::CreateAppActivity( 30 Activity* ContentActivityFactory::CreateAppActivity(
29 const std::string& app_id, 31 const std::string& app_id,
30 views::WebView* web_view) { 32 views::WebView* web_view) {
31 Activity* activity = new AppActivity(app_id, web_view); 33 Activity* activity = new AppActivity(app_id, web_view);
32 ActivityManager::Get()->AddActivity(activity); 34 ActivityManager::Get()->AddActivity(activity);
35 activity->GetWindow()->SetName("AppActivity");
33 return activity; 36 return activity;
34 } 37 }
35 38
36 ActivityFactory* CreateContentActivityFactory() { 39 ActivityFactory* CreateContentActivityFactory() {
37 return new ContentActivityFactory(); 40 return new ContentActivityFactory();
38 } 41 }
39 42
40 } // namespace athena 43 } // namespace athena
OLDNEW
« no previous file with comments | « no previous file | athena/wm/public/window_list_provider.h » ('j') | athena/wm/window_list_provider_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698