OLD | NEW |
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/activity/public/activity_factory.h" | 5 #include "athena/activity/public/activity_factory.h" |
6 #include "athena/activity/public/activity_manager.h" | 6 #include "athena/activity/public/activity_manager.h" |
7 #include "athena/content/public/web_contents_view_delegate_creator.h" | 7 #include "athena/content/public/web_contents_view_delegate_creator.h" |
8 #include "athena/env/public/athena_env.h" | 8 #include "athena/env/public/athena_env.h" |
9 #include "athena/extensions/public/extensions_delegate.h" | 9 #include "athena/extensions/public/extensions_delegate.h" |
10 #include "athena/main/athena_launcher.h" | 10 #include "athena/main/athena_launcher.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 } | 46 } |
47 | 47 |
48 // Creates a new app window and adds it to the desktop. The desktop maintains | 48 // Creates a new app window and adds it to the desktop. The desktop maintains |
49 // ownership of the window. | 49 // ownership of the window. |
50 virtual extensions::ShellAppWindow* CreateAppWindow( | 50 virtual extensions::ShellAppWindow* CreateAppWindow( |
51 content::BrowserContext* context, | 51 content::BrowserContext* context, |
52 const extensions::Extension* extension) OVERRIDE { | 52 const extensions::Extension* extension) OVERRIDE { |
53 extensions::ShellAppWindow* app_window = new extensions::ShellAppWindow(); | 53 extensions::ShellAppWindow* app_window = new extensions::ShellAppWindow(); |
54 app_window->Init(context, extension, gfx::Size(100, 100)); | 54 app_window->Init(context, extension, gfx::Size(100, 100)); |
55 athena::ActivityManager::Get()->AddActivity( | 55 athena::ActivityManager::Get()->AddActivity( |
56 athena::ActivityFactory::Get()->CreateAppActivity(app_window)); | 56 athena::ActivityFactory::Get()->CreateAppActivity(app_window, |
| 57 extension->id())); |
57 return app_window; | 58 return app_window; |
58 } | 59 } |
59 | 60 |
60 // Closes and destroys the app windows. | 61 // Closes and destroys the app windows. |
61 virtual void CloseAppWindows() OVERRIDE {} | 62 virtual void CloseAppWindows() OVERRIDE {} |
62 | 63 |
63 DISALLOW_COPY_AND_ASSIGN(AthenaDesktopController); | 64 DISALLOW_COPY_AND_ASSIGN(AthenaDesktopController); |
64 }; | 65 }; |
65 | 66 |
66 class AthenaBrowserMainDelegate : public extensions::ShellBrowserMainDelegate { | 67 class AthenaBrowserMainDelegate : public extensions::ShellBrowserMainDelegate { |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 | 148 |
148 int main(int argc, const char** argv) { | 149 int main(int argc, const char** argv) { |
149 AthenaMainDelegate delegate; | 150 AthenaMainDelegate delegate; |
150 content::ContentMainParams params(&delegate); | 151 content::ContentMainParams params(&delegate); |
151 | 152 |
152 params.argc = argc; | 153 params.argc = argc; |
153 params.argv = argv; | 154 params.argv = argv; |
154 | 155 |
155 return content::ContentMain(params); | 156 return content::ContentMain(params); |
156 } | 157 } |
OLD | NEW |