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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "ui/keyboard/keyboard_controller_proxy.h" 5 #include "ui/keyboard/keyboard_controller_proxy.h"
6 6
7 #include "content/public/browser/site_instance.h" 7 #include "content/public/browser/site_instance.h"
8 #include "content/public/browser/web_contents.h" 8 #include "content/public/browser/web_contents.h"
9 #include "content/public/browser/web_contents_delegate.h" 9 #include "content/public/browser/web_contents_delegate.h"
10 #include "content/public/browser/web_contents_observer.h" 10 #include "content/public/browser/web_contents_observer.h"
(...skipping 19 matching lines...) Expand all
30 params.url, params.referrer, params.transition, params.extra_headers); 30 params.url, params.referrer, params.transition, params.extra_headers);
31 Observe(source); 31 Observe(source);
32 return source; 32 return source;
33 } 33 }
34 34
35 // Overridden from content::WebContentsObserver: 35 // Overridden from content::WebContentsObserver:
36 virtual void WebContentsDestroyed(content::WebContents* contents) OVERRIDE { 36 virtual void WebContentsDestroyed(content::WebContents* contents) OVERRIDE {
37 delete this; 37 delete this;
38 } 38 }
39 39
40 virtual void RequestMediaAccessPermission(
41 content::WebContents* web_contents,
42 const content::MediaStreamRequest& request,
43 const content::MediaResponseCallback& callback) OVERRIDE {
sadrul 2013/05/14 05:13:03 I took a brief look at the code in ProcessMediaAcc
44 const extensions::Extension* extension = NULL;
45 GURL origin(request.security_origin);
46 if (origin.SchemeIs(extensions::kExtensionScheme)) {
47 ExtensionService* extensions_service =
48 extensions::ExtensionSystem::Get(profile_)->extension_service();
49 extension = extensions_service->extensions()->GetByID(origin.host());
50 DCHECK(extension);
51 }
52
53 MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest(
54 web_contents, request, callback, extension);
55 }
56
40 DISALLOW_COPY_AND_ASSIGN(KeyboardContentsDelegate); 57 DISALLOW_COPY_AND_ASSIGN(KeyboardContentsDelegate);
41 }; 58 };
42 59
43 } // namespace 60 } // namespace
44 61
45 namespace keyboard { 62 namespace keyboard {
46 63
47 KeyboardControllerProxy::KeyboardControllerProxy() { 64 KeyboardControllerProxy::KeyboardControllerProxy() {
48 } 65 }
49 66
(...skipping 18 matching lines...) Expand all
68 keyboard_contents_->OpenURL(params); 85 keyboard_contents_->OpenURL(params);
69 } 86 }
70 87
71 return keyboard_contents_->GetView()->GetNativeView(); 88 return keyboard_contents_->GetView()->GetNativeView();
72 } 89 }
73 90
74 void KeyboardControllerProxy::SetupWebContents(content::WebContents* contents) { 91 void KeyboardControllerProxy::SetupWebContents(content::WebContents* contents) {
75 } 92 }
76 93
77 } // namespace keyboard 94 } // namespace keyboard
OLDNEW
« 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