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

Side by Side Diff: chrome/browser/media/media_stream_capture_indicator.h

Issue 13355003: Minor cleanups in MediaStreamCaptureIndicator. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 CHROME_BROWSER_MEDIA_MEDIA_STREAM_CAPTURE_INDICATOR_H_ 5 #ifndef CHROME_BROWSER_MEDIA_MEDIA_STREAM_CAPTURE_INDICATOR_H_
6 #define CHROME_BROWSER_MEDIA_MEDIA_STREAM_CAPTURE_INDICATOR_H_ 6 #define CHROME_BROWSER_MEDIA_MEDIA_STREAM_CAPTURE_INDICATOR_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 void CaptureDevicesOpened(int render_process_id, 47 void CaptureDevicesOpened(int render_process_id,
48 int render_view_id, 48 int render_view_id,
49 const content::MediaStreamDevices& devices, 49 const content::MediaStreamDevices& devices,
50 const base::Closure& close_callback); 50 const base::Closure& close_callback);
51 51
52 // Called on IO thread when MediaStream closes the opened devices. 52 // Called on IO thread when MediaStream closes the opened devices.
53 void CaptureDevicesClosed(int render_process_id, 53 void CaptureDevicesClosed(int render_process_id,
54 int render_view_id, 54 int render_view_id,
55 const content::MediaStreamDevices& devices); 55 const content::MediaStreamDevices& devices);
56 56
57 // Returns true if the render view is capturing user media (e.g., webcam 57 // Returns true if the render view is capturing user media (e.g., webcam
miu 2013/04/03 23:05:21 s/render view/WebContents/
Sergey Ulanov 2013/04/03 23:43:30 Done.
58 // or microphone input). 58 // or microphone input).
59 bool IsCapturingUserMedia(int render_process_id, int render_view_id) const; 59 bool IsCapturingUserMedia(content::WebContents* web_contents) const;
60 60
61 // Returns true if the render view itself is being mirrored (e.g., a source of 61 // Returns true if the render view itself is being mirrored (e.g., a source of
miu 2013/04/03 23:05:21 here too: s/render view/WebContents/
Sergey Ulanov 2013/04/03 23:43:30 Done.
62 // media for remote broadcast). 62 // media for remote broadcast).
63 bool IsBeingMirrored(int render_process_id, int render_view_id) const; 63 bool IsBeingMirrored(content::WebContents* web_contents) const;
64 64
65 private: 65 private:
66 class WebContentsDeviceUsage; 66 class WebContentsDeviceUsage;
67 67
68 friend class base::RefCountedThreadSafe<MediaStreamCaptureIndicator>; 68 friend class base::RefCountedThreadSafe<MediaStreamCaptureIndicator>;
69 virtual ~MediaStreamCaptureIndicator(); 69 virtual ~MediaStreamCaptureIndicator();
70 70
71 // Called by the public functions, executed on UI thread.
72 void DoDevicesOpenedOnUIThread(int render_process_id,
73 int render_view_id,
74 const content::MediaStreamDevices& devices,
75 const base::Closure& close_callback);
76 void DoDevicesClosedOnUIThread(int render_process_id,
77 int render_view_id,
78 const content::MediaStreamDevices& devices);
79
80 // Following functions/variables are executed/accessed only on UI thread. 71 // Following functions/variables are executed/accessed only on UI thread.
81 72
82 // Creates and shows the status tray icon if it has not been created and is 73 // Creates and shows the status tray icon if it has not been created and is
83 // supported on the current platform. 74 // supported on the current platform.
84 void MaybeCreateStatusTrayIcon(); 75 void MaybeCreateStatusTrayIcon();
85 76
86 // Makes sure we have done one-time initialization of the images. 77 // Makes sure we have done one-time initialization of the images.
87 void EnsureStatusTrayIconResources(); 78 void EnsureStatusTrayIconResources();
88 79
89 // Finds a WebContents instance by its RenderView's current or 80 // Finds a WebContents instance by its RenderView's current or
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 // updated. 145 // updated.
155 typedef std::vector<content::WebContents*> CommandTargets; 146 typedef std::vector<content::WebContents*> CommandTargets;
156 CommandTargets command_targets_; 147 CommandTargets command_targets_;
157 148
158 bool should_show_balloon_; 149 bool should_show_balloon_;
159 150
160 scoped_ptr<ScreenCaptureNotificationUI> screen_capture_notification_; 151 scoped_ptr<ScreenCaptureNotificationUI> screen_capture_notification_;
161 }; 152 };
162 153
163 #endif // CHROME_BROWSER_MEDIA_MEDIA_STREAM_CAPTURE_INDICATOR_H_ 154 #endif // CHROME_BROWSER_MEDIA_MEDIA_STREAM_CAPTURE_INDICATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698