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