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

Side by Side Diff: content/renderer/pepper/pepper_media_device_manager.h

Issue 48743008: Pepper: specify the security origin when enumerating media devices. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_MEDIA_DEVICE_MANAGER_H_ 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_MEDIA_DEVICE_MANAGER_H_
6 #define CONTENT_RENDERER_PEPPER_PEPPER_MEDIA_DEVICE_MANAGER_H_ 6 #define CONTENT_RENDERER_PEPPER_PEPPER_MEDIA_DEVICE_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 11 matching lines...) Expand all
22 public RenderViewObserver, 22 public RenderViewObserver,
23 public RenderViewObserverTracker<PepperMediaDeviceManager>, 23 public RenderViewObserverTracker<PepperMediaDeviceManager>,
24 public base::SupportsWeakPtr<PepperMediaDeviceManager> { 24 public base::SupportsWeakPtr<PepperMediaDeviceManager> {
25 public: 25 public:
26 static PepperMediaDeviceManager* GetForRenderView(RenderView* render_view); 26 static PepperMediaDeviceManager* GetForRenderView(RenderView* render_view);
27 virtual ~PepperMediaDeviceManager(); 27 virtual ~PepperMediaDeviceManager();
28 28
29 // PepperDeviceEnumerationHostHelper::Delegate implementation: 29 // PepperDeviceEnumerationHostHelper::Delegate implementation:
30 virtual int EnumerateDevices( 30 virtual int EnumerateDevices(
31 PP_DeviceType_Dev type, 31 PP_DeviceType_Dev type,
32 const GURL& document_url,
32 const EnumerateDevicesCallback& callback) OVERRIDE; 33 const EnumerateDevicesCallback& callback) OVERRIDE;
33 virtual void StopEnumerateDevices(int request_id) OVERRIDE; 34 virtual void StopEnumerateDevices(int request_id) OVERRIDE;
34 35
35 typedef base::Callback<void (int /* request_id */, 36 typedef base::Callback<void (int /* request_id */,
36 bool /* succeeded */, 37 bool /* succeeded */,
37 const std::string& /* label */)> 38 const std::string& /* label */)>
38 OpenDeviceCallback; 39 OpenDeviceCallback;
39 40
40 // Opens the specified device. The request ID passed into the callback will be 41 // Opens the specified device. The request ID passed into the callback will be
41 // the same as the return value. If successful, the label passed into the 42 // the same as the return value. If successful, the label passed into the
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 97
97 typedef std::map<int, OpenDeviceCallback> OpenCallbackMap; 98 typedef std::map<int, OpenDeviceCallback> OpenCallbackMap;
98 OpenCallbackMap open_callbacks_; 99 OpenCallbackMap open_callbacks_;
99 100
100 DISALLOW_COPY_AND_ASSIGN(PepperMediaDeviceManager); 101 DISALLOW_COPY_AND_ASSIGN(PepperMediaDeviceManager);
101 }; 102 };
102 103
103 } // namespace content 104 } // namespace content
104 105
105 #endif // CONTENT_RENDERER_PEPPER_PEPPER_MEDIA_DEVICE_MANAGER_H_ 106 #endif // CONTENT_RENDERER_PEPPER_PEPPER_MEDIA_DEVICE_MANAGER_H_
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_file_system_host.cc ('k') | content/renderer/pepper/pepper_media_device_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698