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

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

Issue 311113005: AppModelBuilder to athena. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
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/public/content_activity_factory.h" 5 #include "athena/content/public/content_activity_factory.h"
6 6
7 #include "athena/content/web_activity.h" 7 #include "athena/content/web_activity.h"
8 #include "content/public/browser/web_contents.h" 8 #include "content/public/browser/web_contents.h"
9 #include "url/gurl.h" 9 #include "url/gurl.h"
10 10
(...skipping 12 matching lines...) Expand all
23 contents->GetController().LoadURL(url, 23 contents->GetController().LoadURL(url,
24 content::Referrer(), 24 content::Referrer(),
25 content::PAGE_TRANSITION_TYPED, 25 content::PAGE_TRANSITION_TYPED,
26 std::string()); 26 std::string());
27 WebActivity* activity = new WebActivity(contents); 27 WebActivity* activity = new WebActivity(contents);
28 // TODO(mukai): it might be better to move Focus to another place. 28 // TODO(mukai): it might be better to move Focus to another place.
29 contents->Focus(); 29 contents->Focus();
30 return activity; 30 return activity;
31 } 31 }
32 32
33 Activity* ContentActivityFactory::CreateAppActivity(
34 content::BrowserContext* browser_context,
35 const std::string& app_id) {
36 // TODO(mukai): port the extension system and launch the app actually.
37 GURL url;
38 if (app_id == "mail")
39 url = GURL("https://mail.google.com/");
40 else if (app_id == "calendar")
41 url = GURL("https://calendar.google.com/");
42 else if (app_id == "video")
43 url = GURL("http://youtube.com/");
44 else if (app_id == "music")
45 url = GURL("https://play.google.com/music");
46 else if (app_id == "contact")
47 url = GURL("https://contact.google.com/");
48 DCHECK(!url.is_empty());
oshima 2014/06/06 23:39:00 how about else LOG(FATAL) << "unknown app id:"
Jun Mukai 2014/06/09 20:33:13 Done.
49 return CreateWebActivity(browser_context, url);
50 }
51
33 } // namespace athena 52 } // namespace athena
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698