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 "extensions/shell/browser/shell_app_delegate.h" |
6 | 6 |
7 #include "extensions/common/constants.h" | 7 #include "extensions/common/constants.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 extensions { |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 | 55 |
56 void ShellAppDelegate::RequestMediaAccessPermission( | 56 void ShellAppDelegate::RequestMediaAccessPermission( |
57 content::WebContents* web_contents, | 57 content::WebContents* web_contents, |
58 const content::MediaStreamRequest& request, | 58 const content::MediaStreamRequest& request, |
59 const content::MediaResponseCallback& callback, | 59 const content::MediaResponseCallback& callback, |
60 const extensions::Extension* extension) { | 60 const extensions::Extension* extension) { |
61 media_capture_util::GrantMediaStreamRequest( | 61 media_capture_util::GrantMediaStreamRequest( |
62 web_contents, request, callback, extension); | 62 web_contents, request, callback, extension); |
63 } | 63 } |
64 | 64 |
| 65 bool ShellAppDelegate::CheckMediaAccessPermission( |
| 66 content::WebContents* web_contents, |
| 67 const GURL& security_origin, |
| 68 content::MediaStreamType type, |
| 69 const Extension* extension) { |
| 70 media_capture_util::VerifyMediaAccessPermission(type, extension); |
| 71 return true; |
| 72 } |
| 73 |
65 int ShellAppDelegate::PreferredIconSize() { | 74 int ShellAppDelegate::PreferredIconSize() { |
66 return extension_misc::EXTENSION_ICON_SMALL; | 75 return extension_misc::EXTENSION_ICON_SMALL; |
67 } | 76 } |
68 | 77 |
69 gfx::ImageSkia ShellAppDelegate::GetAppDefaultIcon() { | 78 gfx::ImageSkia ShellAppDelegate::GetAppDefaultIcon() { |
70 NOTIMPLEMENTED(); | 79 NOTIMPLEMENTED(); |
71 return gfx::ImageSkia(); | 80 return gfx::ImageSkia(); |
72 } | 81 } |
73 | 82 |
74 void ShellAppDelegate::SetWebContentsBlocked( | 83 void ShellAppDelegate::SetWebContentsBlocked( |
75 content::WebContents* web_contents, | 84 content::WebContents* web_contents, |
76 bool blocked) { | 85 bool blocked) { |
77 NOTIMPLEMENTED(); | 86 NOTIMPLEMENTED(); |
78 } | 87 } |
79 | 88 |
80 bool ShellAppDelegate::IsWebContentsVisible( | 89 bool ShellAppDelegate::IsWebContentsVisible( |
81 content::WebContents* web_contents) { | 90 content::WebContents* web_contents) { |
82 return true; | 91 return true; |
83 } | 92 } |
84 | 93 |
85 void ShellAppDelegate::SetTerminatingCallback(const base::Closure& callback) { | 94 void ShellAppDelegate::SetTerminatingCallback(const base::Closure& callback) { |
86 NOTIMPLEMENTED(); | 95 NOTIMPLEMENTED(); |
87 } | 96 } |
88 | 97 |
89 } // namespace extensions | 98 } // namespace extensions |
OLD | NEW |