Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1057)

Unified Diff: ui/keyboard/keyboard_controller_proxy.cc

Issue 14646041: Allow virtual keyboard window to access audio stream and speech api for voice input (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/keyboard/keyboard_controller_proxy.cc
diff --git a/ui/keyboard/keyboard_controller_proxy.cc b/ui/keyboard/keyboard_controller_proxy.cc
index be490055b90b50206fc39d2c03565885356fd1ac..0df627302324a9680414a646b9a4e5c171975cc5 100644
--- a/ui/keyboard/keyboard_controller_proxy.cc
+++ b/ui/keyboard/keyboard_controller_proxy.cc
@@ -37,6 +37,23 @@ class KeyboardContentsDelegate : public content::WebContentsDelegate,
delete this;
}
+ virtual void RequestMediaAccessPermission(
+ content::WebContents* web_contents,
+ const content::MediaStreamRequest& request,
+ const content::MediaResponseCallback& callback) OVERRIDE {
sadrul 2013/05/14 05:13:03 I took a brief look at the code in ProcessMediaAcc
+ const extensions::Extension* extension = NULL;
+ GURL origin(request.security_origin);
+ if (origin.SchemeIs(extensions::kExtensionScheme)) {
+ ExtensionService* extensions_service =
+ extensions::ExtensionSystem::Get(profile_)->extension_service();
+ extension = extensions_service->extensions()->GetByID(origin.host());
+ DCHECK(extension);
+ }
+
+ MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest(
+ web_contents, request, callback, extension);
+ }
+
DISALLOW_COPY_AND_ASSIGN(KeyboardContentsDelegate);
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698