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

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

Issue 1372203002: Throttle media decoding after excessive Android media server crashes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 (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_WEB_CONTENTS_DELEGATE_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_
6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 19 matching lines...) Expand all
30 namespace base { 30 namespace base {
31 class FilePath; 31 class FilePath;
32 class ListValue; 32 class ListValue;
33 } 33 }
34 34
35 namespace content { 35 namespace content {
36 class BrowserContext; 36 class BrowserContext;
37 class ColorChooser; 37 class ColorChooser;
38 class DownloadItem; 38 class DownloadItem;
39 class JavaScriptDialogManager; 39 class JavaScriptDialogManager;
40 #if defined(OS_ANDROID)
41 class MediaThrottler;
Ted C 2015/09/28 22:42:30 why is this needed?
qinmin 2015/09/29 23:16:23 removed
42 #endif
40 class PageState; 43 class PageState;
41 class RenderViewHost; 44 class RenderViewHost;
42 class SessionStorageNamespace; 45 class SessionStorageNamespace;
43 class WebContents; 46 class WebContents;
44 class WebContentsImpl; 47 class WebContentsImpl;
45 struct ColorSuggestion; 48 struct ColorSuggestion;
46 struct ContextMenuParams; 49 struct ContextMenuParams;
47 struct DropData; 50 struct DropData;
48 struct FileChooserParams; 51 struct FileChooserParams;
49 struct NativeWebKeyboardEvent; 52 struct NativeWebKeyboardEvent;
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 const MediaStreamRequest& request, 449 const MediaStreamRequest& request,
447 const MediaResponseCallback& callback); 450 const MediaResponseCallback& callback);
448 451
449 // Checks if we have permission to access the microphone or camera. Note that 452 // Checks if we have permission to access the microphone or camera. Note that
450 // this does not query the user. |type| must be MEDIA_DEVICE_AUDIO_CAPTURE 453 // this does not query the user. |type| must be MEDIA_DEVICE_AUDIO_CAPTURE
451 // or MEDIA_DEVICE_VIDEO_CAPTURE. 454 // or MEDIA_DEVICE_VIDEO_CAPTURE.
452 virtual bool CheckMediaAccessPermission(WebContents* web_contents, 455 virtual bool CheckMediaAccessPermission(WebContents* web_contents,
453 const GURL& security_origin, 456 const GURL& security_origin,
454 MediaStreamType type); 457 MediaStreamType type);
455 458
459 #if defined(OS_ANDROID)
460 // Asks permission to decode media stream. After permission is determined,
461 // |callback| will be called with the result.
462 virtual void RequestMediaDecodePermission(
463 WebContents* web_contents,
464 const base::Callback<void(bool)>& callback);
465 #endif
466
456 // Requests permission to access the PPAPI broker. The delegate should return 467 // Requests permission to access the PPAPI broker. The delegate should return
457 // true and call the passed in |callback| with the result, or return false 468 // true and call the passed in |callback| with the result, or return false
458 // to indicate that it does not support asking for permission. 469 // to indicate that it does not support asking for permission.
459 virtual bool RequestPpapiBrokerPermission( 470 virtual bool RequestPpapiBrokerPermission(
460 WebContents* web_contents, 471 WebContents* web_contents,
461 const GURL& url, 472 const GURL& url,
462 const base::FilePath& plugin_path, 473 const base::FilePath& plugin_path,
463 const base::Callback<void(bool)>& callback); 474 const base::Callback<void(bool)>& callback);
464 475
465 // Returns the size for the new render view created for the pending entry in 476 // Returns the size for the new render view created for the pending entry in
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 // Called when |this| is no longer the WebContentsDelegate for |source|. 528 // Called when |this| is no longer the WebContentsDelegate for |source|.
518 void Detach(WebContents* source); 529 void Detach(WebContents* source);
519 530
520 // The WebContents that this is currently a delegate for. 531 // The WebContents that this is currently a delegate for.
521 std::set<WebContents*> attached_contents_; 532 std::set<WebContents*> attached_contents_;
522 }; 533 };
523 534
524 } // namespace content 535 } // namespace content
525 536
526 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ 537 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698