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

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

Issue 257153003: We have a problem in the process on destroying WebContentsImpl because (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Rebased onto origin/master again, resolved conflicts Created 6 years, 7 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 #include "chrome/browser/media/media_stream_capture_indicator.h" 5 #include "chrome/browser/media/media_stream_capture_indicator.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/i18n/rtl.h" 8 #include "base/i18n/rtl.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 const content::MediaStreamDevices& devices); 154 const content::MediaStreamDevices& devices);
155 155
156 // Increment ref-counts up based on the type of each device provided. 156 // Increment ref-counts up based on the type of each device provided.
157 void AddDevices(const content::MediaStreamDevices& devices); 157 void AddDevices(const content::MediaStreamDevices& devices);
158 158
159 // Decrement ref-counts up based on the type of each device provided. 159 // Decrement ref-counts up based on the type of each device provided.
160 void RemoveDevices(const content::MediaStreamDevices& devices); 160 void RemoveDevices(const content::MediaStreamDevices& devices);
161 161
162 private: 162 private:
163 // content::WebContentsObserver overrides. 163 // content::WebContentsObserver overrides.
164 virtual void WebContentsDestroyed(WebContents* web_contents) OVERRIDE { 164 virtual void WebContentsDestroyed() OVERRIDE {
165 indicator_->UnregisterWebContents(web_contents); 165 indicator_->UnregisterWebContents(web_contents());
166 delete this; 166 delete this;
167 } 167 }
168 168
169 scoped_refptr<MediaStreamCaptureIndicator> indicator_; 169 scoped_refptr<MediaStreamCaptureIndicator> indicator_;
170 int audio_ref_count_; 170 int audio_ref_count_;
171 int video_ref_count_; 171 int video_ref_count_;
172 int mirroring_ref_count_; 172 int mirroring_ref_count_;
173 173
174 base::WeakPtrFactory<WebContentsDeviceUsage> weak_factory_; 174 base::WeakPtrFactory<WebContentsDeviceUsage> weak_factory_;
175 175
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 } else if (audio && !video) { 482 } else if (audio && !video) {
483 message_id = IDS_MEDIA_STREAM_STATUS_TRAY_TEXT_AUDIO_ONLY; 483 message_id = IDS_MEDIA_STREAM_STATUS_TRAY_TEXT_AUDIO_ONLY;
484 *image = *mic_image_; 484 *image = *mic_image_;
485 } else if (!audio && video) { 485 } else if (!audio && video) {
486 message_id = IDS_MEDIA_STREAM_STATUS_TRAY_TEXT_VIDEO_ONLY; 486 message_id = IDS_MEDIA_STREAM_STATUS_TRAY_TEXT_VIDEO_ONLY;
487 *image = *camera_image_; 487 *image = *camera_image_;
488 } 488 }
489 489
490 *tool_tip = l10n_util::GetStringUTF16(message_id); 490 *tool_tip = l10n_util::GetStringUTF16(message_id);
491 } 491 }
OLDNEW
« no previous file with comments | « chrome/browser/infobars/infobar_service.cc ('k') | chrome/browser/media_galleries/media_file_system_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698