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

Side by Side Diff: content/public/browser/content_browser_client.h

Issue 10542092: Refactor the content interface for RequestMediaAccessPermission. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 6 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
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_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_
6 #define CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ 6 #define CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/callback_forward.h" 13 #include "base/callback_forward.h"
14 #include "content/public/common/content_client.h" 14 #include "content/public/common/content_client.h"
15 #include "content/public/common/media_stream_request.h"
16 #include "content/public/common/window_container_type.h" 15 #include "content/public/common/window_container_type.h"
17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNotificationPresen ter.h" 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNotificationPresen ter.h"
18 17
19 class CommandLine; 18 class CommandLine;
20 class FilePath; 19 class FilePath;
21 class GURL; 20 class GURL;
22 class PluginProcessHost; 21 class PluginProcessHost;
23 22
24 namespace webkit_glue { 23 namespace webkit_glue {
25 struct WebPreferences; 24 struct WebPreferences;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 class SiteInstance; 60 class SiteInstance;
62 class SpeechInputManagerDelegate; 61 class SpeechInputManagerDelegate;
63 class SpeechRecognitionManagerDelegate; 62 class SpeechRecognitionManagerDelegate;
64 class WebContents; 63 class WebContents;
65 class WebContentsView; 64 class WebContentsView;
66 class WebContentsViewDelegate; 65 class WebContentsViewDelegate;
67 class WebUIControllerFactory; 66 class WebUIControllerFactory;
68 struct MainFunctionParams; 67 struct MainFunctionParams;
69 struct ShowDesktopNotificationHostMsgParams; 68 struct ShowDesktopNotificationHostMsgParams;
70 69
71 typedef base::Callback< void(const MediaStreamDevices&) > MediaResponseCallback;
72
73 // Embedder API (or SPI) for participating in browser logic, to be implemented 70 // Embedder API (or SPI) for participating in browser logic, to be implemented
74 // by the client of the content browser. See ChromeContentBrowserClient for the 71 // by the client of the content browser. See ChromeContentBrowserClient for the
75 // principal implementation. The methods are assumed to be called on the UI 72 // principal implementation. The methods are assumed to be called on the UI
76 // thread unless otherwise specified. Use this "escape hatch" sparingly, to 73 // thread unless otherwise specified. Use this "escape hatch" sparingly, to
77 // avoid the embedder interface ballooning and becoming very specific to Chrome. 74 // avoid the embedder interface ballooning and becoming very specific to Chrome.
78 // (Often, the call out to the client can happen in a different part of the code 75 // (Often, the call out to the client can happen in a different part of the code
79 // that either already has a hook out to the embedder, or calls out to one of 76 // that either already has a hook out to the embedder, or calls out to one of
80 // the observer interfaces.) 77 // the observer interfaces.)
81 class CONTENT_EXPORT ContentBrowserClient { 78 class CONTENT_EXPORT ContentBrowserClient {
82 public: 79 public:
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 virtual void AddNewCertificate( 282 virtual void AddNewCertificate(
286 net::URLRequest* request, 283 net::URLRequest* request,
287 net::X509Certificate* cert, 284 net::X509Certificate* cert,
288 int render_process_id, 285 int render_process_id,
289 int render_view_id) {} 286 int render_view_id) {}
290 287
291 // Returns a a class to get notifications about media event. The embedder can 288 // Returns a a class to get notifications about media event. The embedder can
292 // return NULL if they're not interested. 289 // return NULL if they're not interested.
293 virtual MediaObserver* GetMediaObserver(); 290 virtual MediaObserver* GetMediaObserver();
294 291
295 // Asks permission to use the camera and/or microphone. If permission is
296 // granted, a call should be made to |callback| with the devices. If the
297 // request is denied, a call should be made to |callback| with an empty list
298 // of devices. |request| has the details of the request (e.g. which of audio
299 // and/or video devices are requested, and lists of available devices).
300 virtual void RequestMediaAccessPermission(
301 const MediaStreamRequest* request,
302 const MediaResponseCallback& callback) {}
303
304 // Asks permission to show desktop notifications. 292 // Asks permission to show desktop notifications.
305 virtual void RequestDesktopNotificationPermission( 293 virtual void RequestDesktopNotificationPermission(
306 const GURL& source_origin, 294 const GURL& source_origin,
307 int callback_context, 295 int callback_context,
308 int render_process_id, 296 int render_process_id,
309 int render_view_id) {} 297 int render_view_id) {}
310 298
311 // Checks if the given page has permission to show desktop notifications. 299 // Checks if the given page has permission to show desktop notifications.
312 // This is called on the IO thread. 300 // This is called on the IO thread.
313 virtual WebKit::WebNotificationPresenter::Permission 301 virtual WebKit::WebNotificationPresenter::Permission
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 // This is called on a worker thread. 406 // This is called on a worker thread.
419 virtual 407 virtual
420 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( 408 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate(
421 const GURL& url); 409 const GURL& url);
422 #endif 410 #endif
423 }; 411 };
424 412
425 } // namespace content 413 } // namespace content
426 414
427 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ 415 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | content/public/browser/content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698