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

Side by Side Diff: content/browser/renderer_host/media/media_stream_device_settings.h

Issue 10829190: Resolve the problems where we can leak the system tray UI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed the comments and added unit tests to media_stream_device_settings_unittest Created 8 years, 4 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 // MediaStreamDeviceSettings is used to decide which of the available capture 5 // MediaStreamDeviceSettings is used to decide which of the available capture
6 // device to use as well as getting user permission to use the capture device. 6 // device to use as well as getting user permission to use the capture device.
7 // There will be one instance of MediaStreamDeviceSettings handling all 7 // There will be one instance of MediaStreamDeviceSettings handling all
8 // requests. 8 // requests.
9 9
10 // Expected call flow: 10 // Expected call flow:
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 // view. 74 // view.
75 bool IsUiBusy(int render_view_id, int render_process_id); 75 bool IsUiBusy(int render_view_id, int render_process_id);
76 76
77 // Finds a request ready to be sent to UI for user approval. 77 // Finds a request ready to be sent to UI for user approval.
78 std::string FindReadyRequestForView(int render_view_id, 78 std::string FindReadyRequestForView(int render_view_id,
79 int render_process_id); 79 int render_process_id);
80 80
81 // Posts a request to be approved/denied by UI. 81 // Posts a request to be approved/denied by UI.
82 void PostRequestToUi(const std::string& label); 82 void PostRequestToUi(const std::string& label);
83 83
84 // Posts a request to fake UI which is used for testing purpose.
85 void PostRequestToFakeUI(const std::string& label);
86
84 SettingsRequester* requester_; 87 SettingsRequester* requester_;
85 SettingsRequests requests_; 88 SettingsRequests requests_;
86 89
87 // See comment above for method UseFakeUI. Used for automated testing. 90 // See comment above for method UseFakeUI. Used for automated testing.
88 bool use_fake_ui_; 91 bool use_fake_ui_;
89 92
90 base::WeakPtrFactory<MediaStreamDeviceSettings> weak_ptr_factory_; 93 base::WeakPtrFactory<MediaStreamDeviceSettings> weak_ptr_factory_;
91 94
92 DISALLOW_COPY_AND_ASSIGN(MediaStreamDeviceSettings); 95 DISALLOW_COPY_AND_ASSIGN(MediaStreamDeviceSettings);
93 }; 96 };
94 97
95 } // namespace media_stream 98 } // namespace media_stream
96 99
97 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_DEVICE_SETTINGS_H_ 100 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_DEVICE_SETTINGS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698