OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "athena/content/content_activity_factory.h" | |
6 | |
7 #include "apps/app_window.h" | |
8 #include "athena/content/app_activity.h" | |
Jun Mukai
2014/08/28 22:50:45
This file looks like unrelated to chrome. Is hashi
oshima
2014/08/28 23:59:04
apps/app_window currently requires chrome. Once hi
| |
9 | |
10 // TODO(oshima): Consolidate this and app shell implementation once | |
11 // crbug.com/403726 is fixed. | |
12 namespace athena { | |
13 namespace { | |
14 | |
15 class ChromeAppActivity : public AppActivity { | |
16 public: | |
17 explicit ChromeAppActivity(apps::AppWindow* app_window) | |
18 : AppActivity(app_window->extension_id()), app_window_(app_window) {} | |
19 | |
20 private: | |
21 virtual ~ChromeAppActivity() {} | |
22 | |
23 // AppActivity: | |
24 virtual content::WebContents* GetWebContents() OVERRIDE { | |
25 return app_window_->web_contents(); | |
26 } | |
27 | |
28 // Not owned. | |
29 apps::AppWindow* app_window_; | |
30 | |
31 DISALLOW_COPY_AND_ASSIGN(ChromeAppActivity); | |
32 }; | |
33 | |
34 } // namespace | |
35 | |
36 Activity* ContentActivityFactory::CreateAppActivity( | |
37 apps::AppWindow* app_window) { | |
38 return new ChromeAppActivity(app_window); | |
39 } | |
40 | |
41 Activity* ContentActivityFactory::CreateAppActivity( | |
42 extensions::ShellAppWindow* app_window, | |
43 const std::string& app_id) { | |
44 return NULL; | |
45 } | |
46 | |
47 } // namespace athena | |
OLD | NEW |