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 "extensions/shell/browser/shell_app_delegate.h" | 5 #include "athena/extensions/shell/athena_shell_app_delegate.h" |
6 | 6 |
7 #include "extensions/common/constants.h" | 7 #include "content/public/browser/web_contents.h" |
8 #include "extensions/shell/browser/media_capture_util.h" | 8 #include "extensions/shell/browser/media_capture_util.h" |
9 | 9 |
10 namespace extensions { | 10 namespace athena { |
11 | 11 |
12 ShellAppDelegate::ShellAppDelegate() { | 12 AthenaShellAppDelegate::AthenaShellAppDelegate() { |
13 } | 13 } |
14 | 14 |
15 ShellAppDelegate::~ShellAppDelegate() { | 15 AthenaShellAppDelegate::~AthenaShellAppDelegate() { |
16 } | 16 } |
17 | 17 |
18 void ShellAppDelegate::InitWebContents(content::WebContents* web_contents) { | 18 void AthenaShellAppDelegate::InitWebContents( |
19 } | 19 content::WebContents* web_contents) { |
20 | 20 // TODO(oshima): Enable Favicon, Printing, e c. See |
21 void ShellAppDelegate::ResizeWebContents(content::WebContents* web_contents, | 21 // athena_chrome_app_delegate.cc. |
22 const gfx::Size& size) { | |
23 NOTIMPLEMENTED(); | 22 NOTIMPLEMENTED(); |
24 } | 23 } |
25 | 24 |
26 content::WebContents* ShellAppDelegate::OpenURLFromTab( | 25 content::ColorChooser* AthenaShellAppDelegate::ShowColorChooser( |
27 content::BrowserContext* context, | |
28 content::WebContents* source, | |
29 const content::OpenURLParams& params) { | |
30 NOTIMPLEMENTED(); | |
31 return NULL; | |
32 } | |
33 | |
34 void ShellAppDelegate::AddNewContents(content::BrowserContext* context, | |
35 content::WebContents* new_contents, | |
36 WindowOpenDisposition disposition, | |
37 const gfx::Rect& initial_pos, | |
38 bool user_gesture, | |
39 bool* was_blocked) { | |
40 NOTIMPLEMENTED(); | |
41 } | |
42 | |
43 content::ColorChooser* ShellAppDelegate::ShowColorChooser( | |
44 content::WebContents* web_contents, | 26 content::WebContents* web_contents, |
45 SkColor initial_color) { | 27 SkColor initial_color) { |
46 NOTIMPLEMENTED(); | 28 NOTIMPLEMENTED(); |
47 return NULL; | 29 return NULL; |
48 } | 30 } |
49 | 31 |
50 void ShellAppDelegate::RunFileChooser( | 32 void AthenaShellAppDelegate::RunFileChooser( |
51 content::WebContents* tab, | 33 content::WebContents* tab, |
52 const content::FileChooserParams& params) { | 34 const content::FileChooserParams& params) { |
53 NOTIMPLEMENTED(); | 35 NOTIMPLEMENTED(); |
54 } | 36 } |
55 | 37 |
56 void ShellAppDelegate::RequestMediaAccessPermission( | 38 void AthenaShellAppDelegate::RequestMediaAccessPermission( |
57 content::WebContents* web_contents, | 39 content::WebContents* web_contents, |
58 const content::MediaStreamRequest& request, | 40 const content::MediaStreamRequest& request, |
59 const content::MediaResponseCallback& callback, | 41 const content::MediaResponseCallback& callback, |
60 const extensions::Extension* extension) { | 42 const extensions::Extension* extension) { |
61 media_capture_util::GrantMediaStreamRequest( | 43 extensions::media_capture_util::GrantMediaStreamRequest( |
62 web_contents, request, callback, extension); | 44 web_contents, request, callback, extension); |
63 } | 45 } |
64 | 46 |
65 bool ShellAppDelegate::CheckMediaAccessPermission( | 47 bool AthenaShellAppDelegate::CheckMediaAccessPermission( |
66 content::WebContents* web_contents, | 48 content::WebContents* web_contents, |
67 const GURL& security_origin, | 49 const GURL& security_origin, |
68 content::MediaStreamType type, | 50 content::MediaStreamType type, |
69 const Extension* extension) { | 51 const extensions::Extension* extension) { |
70 media_capture_util::VerifyMediaAccessPermission(type, extension); | 52 extensions::media_capture_util::VerifyMediaAccessPermission(type, extension); |
71 return true; | 53 return true; |
72 } | 54 } |
73 | 55 |
74 int ShellAppDelegate::PreferredIconSize() { | 56 void AthenaShellAppDelegate::SetWebContentsBlocked( |
75 return extension_misc::EXTENSION_ICON_SMALL; | |
76 } | |
77 | |
78 gfx::ImageSkia ShellAppDelegate::GetAppDefaultIcon() { | |
79 NOTIMPLEMENTED(); | |
80 return gfx::ImageSkia(); | |
81 } | |
82 | |
83 void ShellAppDelegate::SetWebContentsBlocked( | |
84 content::WebContents* web_contents, | 57 content::WebContents* web_contents, |
85 bool blocked) { | 58 bool blocked) { |
86 NOTIMPLEMENTED(); | 59 NOTIMPLEMENTED(); |
87 } | 60 } |
88 | 61 } // namespace athena |
89 bool ShellAppDelegate::IsWebContentsVisible( | |
90 content::WebContents* web_contents) { | |
91 return true; | |
92 } | |
93 | |
94 void ShellAppDelegate::SetTerminatingCallback(const base::Closure& callback) { | |
95 NOTIMPLEMENTED(); | |
96 } | |
97 | |
98 } // namespace extensions | |
OLD | NEW |