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

Side by Side Diff: extensions/browser/app_window/app_web_contents_helper.h

Issue 562263002: Check media permissions through RenderFrameHostDelegate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@render_frame_get_sources
Patch Set: Rebase Created 6 years, 3 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
OLDNEW
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 #ifndef EXTENSIONS_BROWSER_APP_WINDOW_APP_WEB_CONTENTS_HELPER_H_ 5 #ifndef EXTENSIONS_BROWSER_APP_WINDOW_APP_WEB_CONTENTS_HELPER_H_
6 #define EXTENSIONS_BROWSER_APP_WINDOW_APP_WEB_CONTENTS_HELPER_H_ 6 #define EXTENSIONS_BROWSER_APP_WINDOW_APP_WEB_CONTENTS_HELPER_H_
7 7
8 #include "content/public/common/console_message_level.h" 8 #include "content/public/common/console_message_level.h"
9 #include "content/public/common/media_stream_request.h" 9 #include "content/public/common/media_stream_request.h"
10 10
(...skipping 30 matching lines...) Expand all
41 41
42 // Requests to lock the mouse. See WebContentsDelegate. 42 // Requests to lock the mouse. See WebContentsDelegate.
43 void RequestToLockMouse() const; 43 void RequestToLockMouse() const;
44 44
45 // Asks permission to use the camera and/or microphone. See 45 // Asks permission to use the camera and/or microphone. See
46 // WebContentsDelegate. 46 // WebContentsDelegate.
47 void RequestMediaAccessPermission( 47 void RequestMediaAccessPermission(
48 const content::MediaStreamRequest& request, 48 const content::MediaStreamRequest& request,
49 const content::MediaResponseCallback& callback) const; 49 const content::MediaResponseCallback& callback) const;
50 50
51 // Checks permission to use the camera or microphone. See
52 // WebContentsDelegate.
53 bool CheckMediaAccessPermission(const GURL& security_origin,
54 content::MediaStreamType type) const;
55
51 private: 56 private:
52 const Extension* GetExtension() const; 57 const Extension* GetExtension() const;
53 58
54 // Helper method to add a message to the renderer's DevTools console. 59 // Helper method to add a message to the renderer's DevTools console.
55 void AddMessageToDevToolsConsole(content::ConsoleMessageLevel level, 60 void AddMessageToDevToolsConsole(content::ConsoleMessageLevel level,
56 const std::string& message) const; 61 const std::string& message) const;
57 62
58 // The browser context with which this window is associated. 63 // The browser context with which this window is associated.
59 // AppWindowWebContentsDelegate does not own this object. 64 // AppWindowWebContentsDelegate does not own this object.
60 content::BrowserContext* browser_context_; 65 content::BrowserContext* browser_context_;
61 66
62 const std::string extension_id_; 67 const std::string extension_id_;
63 68
64 content::WebContents* web_contents_; 69 content::WebContents* web_contents_;
65 70
66 AppDelegate* app_delegate_; 71 AppDelegate* app_delegate_;
67 72
68 DISALLOW_COPY_AND_ASSIGN(AppWebContentsHelper); 73 DISALLOW_COPY_AND_ASSIGN(AppWebContentsHelper);
69 }; 74 };
70 75
71 } // namespace extensions 76 } // namespace extensions
72 77
73 #endif // EXTENSIONS_BROWSER_APP_WINDOW_APP_WEB_CONTENTS_HELPER_H_ 78 #endif // EXTENSIONS_BROWSER_APP_WINDOW_APP_WEB_CONTENTS_HELPER_H_
OLDNEW
« no previous file with comments | « extensions/browser/app_window/app_delegate.h ('k') | extensions/browser/app_window/app_web_contents_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698