OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "extensions/shell/browser/shell_extension_host_delegate.h" | |
6 | |
7 #include "base/logging.h" | |
8 #include "extensions/shell/browser/media_capture_util.h" | |
9 #include "extensions/shell/browser/shell_extension_web_contents_observer.h" | |
10 | |
11 namespace extensions { | |
12 | |
13 ShellExtensionHostDelegate::ShellExtensionHostDelegate() { | |
14 } | |
15 | |
16 ShellExtensionHostDelegate::~ShellExtensionHostDelegate() { | |
17 } | |
18 | |
19 void ShellExtensionHostDelegate::OnExtensionHostCreated( | |
20 content::WebContents* web_contents) { | |
21 ShellExtensionWebContentsObserver::CreateForWebContents(web_contents); | |
22 } | |
23 | |
24 void ShellExtensionHostDelegate::OnRenderViewCreatedForBackgroundPage( | |
25 ExtensionHost* host) { | |
26 } | |
27 | |
28 content::JavaScriptDialogManager* | |
29 ShellExtensionHostDelegate::GetJavaScriptDialogManager() { | |
30 // TODO(jamescook): Create a JavaScriptDialogManager or reuse the one from | |
31 // content_shell. | |
32 NOTREACHED(); | |
33 return NULL; | |
34 } | |
35 | |
36 void ShellExtensionHostDelegate::CreateTab(content::WebContents* web_contents, | |
37 const std::string& extension_id, | |
38 WindowOpenDisposition disposition, | |
39 const gfx::Rect& initial_pos, | |
40 bool user_gesture) { | |
41 // TODO(jamescook): Should app_shell support opening popup windows? | |
42 NOTREACHED(); | |
43 } | |
44 | |
45 void ShellExtensionHostDelegate::ProcessMediaAccessRequest( | |
46 content::WebContents* web_contents, | |
47 const content::MediaStreamRequest& request, | |
48 const content::MediaResponseCallback& callback, | |
49 const Extension* extension) { | |
50 // Allow access to the first microphone and/or camera. | |
51 media_capture_util::GrantMediaStreamRequestWithFirstDevice( | |
James Cook
2014/08/20 18:17:16
This is the only line I added -- the rest is just
no longer working on chromium
2014/08/22 13:09:53
I am not very sure, but shouldn't you do some kind
| |
52 web_contents, request, callback); | |
53 } | |
54 | |
55 } // namespace extensions | |
56 | |
OLD | NEW |