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

Side by Side Diff: content/renderer/media/media_stream_dependency_factory.cc

Issue 12210030: Linux/ChromeOS Chromium style checker cleanup, content/ edition. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 10 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 #include "content/renderer/media/media_stream_dependency_factory.h" 5 #include "content/renderer/media/media_stream_dependency_factory.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/synchronization/waitable_event.h" 9 #include "base/synchronization/waitable_event.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 default: 122 default:
123 NOTREACHED(); 123 NOTREACHED();
124 } 124 }
125 } 125 }
126 126
127 void StartObservering() { 127 void StartObservering() {
128 DCHECK(CalledOnValidThread()); 128 DCHECK(CalledOnValidThread());
129 CheckIfSourcesAreLive(); 129 CheckIfSourcesAreLive();
130 } 130 }
131 131
132 virtual void OnChanged() { 132 virtual void OnChanged() OVERRIDE {
133 DCHECK(CalledOnValidThread()); 133 DCHECK(CalledOnValidThread());
134 CheckIfSourcesAreLive(); 134 CheckIfSourcesAreLive();
135 } 135 }
136 136
137 private: 137 private:
138 void CheckIfSourcesAreLive() { 138 void CheckIfSourcesAreLive() {
139 ObservedSources::iterator it = sources_.begin(); 139 ObservedSources::iterator it = sources_.begin();
140 while (it != sources_.end()) { 140 while (it != sources_.end()) {
141 if ((*it)->state() != webrtc::MediaSourceInterface::kInitializing) { 141 if ((*it)->state() != webrtc::MediaSourceInterface::kInitializing) {
142 live_ &= (*it)->state() == webrtc::MediaSourceInterface::kLive; 142 live_ &= (*it)->state() == webrtc::MediaSourceInterface::kLive;
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 // processed before returning. We wait for the above task to finish before 591 // processed before returning. We wait for the above task to finish before
592 // letting the the function continue to avoid any potential race issues. 592 // letting the the function continue to avoid any potential race issues.
593 chrome_worker_thread_.Stop(); 593 chrome_worker_thread_.Stop();
594 } else { 594 } else {
595 NOTREACHED() << "Worker thread not running."; 595 NOTREACHED() << "Worker thread not running.";
596 } 596 }
597 } 597 }
598 } 598 }
599 599
600 } // namespace content 600 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698