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/extensions/shell/athena_shell_apps_client.h" | 5 #include "athena/extensions/shell/athena_shell_apps_client.h" |
6 | 6 |
7 #include "athena/extensions/shell/athena_shell_app_delegate.h" | 7 #include "athena/extensions/shell/athena_shell_app_delegate.h" |
8 #include "extensions/browser/app_window/app_window.h" | 8 #include "extensions/browser/app_window/app_window.h" |
9 | 9 |
10 namespace athena { | 10 namespace athena { |
11 | 11 |
12 AthenaShellAppsClient::AthenaShellAppsClient(content::BrowserContext* context) | 12 AthenaShellAppsClient::AthenaShellAppsClient() { |
13 : context_(context) { | |
14 DCHECK(context_); | |
15 } | 13 } |
16 | 14 |
17 AthenaShellAppsClient::~AthenaShellAppsClient() { | 15 AthenaShellAppsClient::~AthenaShellAppsClient() { |
18 } | 16 } |
19 | 17 |
20 std::vector<content::BrowserContext*> | |
21 AthenaShellAppsClient::GetLoadedBrowserContexts() { | |
22 std::vector<content::BrowserContext*> contexts(1, context_); | |
23 return contexts; | |
24 } | |
25 | |
26 extensions::AppWindow* AthenaShellAppsClient::CreateAppWindow( | 18 extensions::AppWindow* AthenaShellAppsClient::CreateAppWindow( |
27 content::BrowserContext* context, | 19 content::BrowserContext* context, |
28 const extensions::Extension* extension) { | 20 const extensions::Extension* extension) { |
29 return new extensions::AppWindow( | 21 return new extensions::AppWindow( |
30 context, new AthenaShellAppDelegate, extension); | 22 context, new AthenaShellAppDelegate, extension); |
31 } | 23 } |
32 | 24 |
33 void AthenaShellAppsClient::OpenDevToolsWindow( | 25 void AthenaShellAppsClient::OpenDevToolsWindow( |
34 content::WebContents* web_contents, | 26 content::WebContents* web_contents, |
35 const base::Closure& callback) { | 27 const base::Closure& callback) { |
36 // TODO(oshima): Figure out what to do. | 28 // TODO(oshima): Figure out what to do. |
37 } | 29 } |
38 | 30 |
39 bool AthenaShellAppsClient::IsCurrentChannelOlderThanDev() { | 31 bool AthenaShellAppsClient::IsCurrentChannelOlderThanDev() { |
40 return false; | 32 return false; |
41 } | 33 } |
42 | 34 |
43 } // namespace athena | 35 } // namespace athena |
OLD | NEW |