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

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

Issue 314303004: Use webview in web activity (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/content/DEPS ('k') | athena/content/web_activity.h » ('j') | 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/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"
9 #include "url/gurl.h"
10 8
11 namespace athena { 9 namespace athena {
12 10
13 ContentActivityFactory::ContentActivityFactory() { 11 ContentActivityFactory::ContentActivityFactory() {
14 } 12 }
15 13
16 ContentActivityFactory::~ContentActivityFactory() {} 14 ContentActivityFactory::~ContentActivityFactory() {}
17 15
18 Activity* ContentActivityFactory::CreateWebActivity( 16 Activity* ContentActivityFactory::CreateWebActivity(
19 content::BrowserContext* browser_context, 17 content::BrowserContext* browser_context,
20 const GURL& url) { 18 const GURL& url) {
21 content::WebContents::CreateParams params(browser_context); 19 return new WebActivity(browser_context, url);
22 content::WebContents* contents = content::WebContents::Create(params);
23 contents->GetController().LoadURL(url,
24 content::Referrer(),
25 content::PAGE_TRANSITION_TYPED,
26 std::string());
27 WebActivity* activity = new WebActivity(contents);
28 // TODO(mukai): it might be better to move Focus to another place.
29 contents->Focus();
30 return activity;
31 } 20 }
32 21
33 } // namespace athena 22 } // namespace athena
OLDNEW
« no previous file with comments | « athena/content/DEPS ('k') | athena/content/web_activity.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698