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

Side by Side Diff: base/threading/thread_restrictions.h

Issue 12356002: [NOT FOR COMMIT] Hacks to merge render compositor thread with UI thread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: New thread restriction allows (incomplete patch) Created 7 years, 9 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 BASE_THREADING_THREAD_RESTRICTIONS_H_ 5 #ifndef BASE_THREADING_THREAD_RESTRICTIONS_H_
6 #define BASE_THREADING_THREAD_RESTRICTIONS_H_ 6 #define BASE_THREADING_THREAD_RESTRICTIONS_H_
7 7
8 #include "base/base_export.h" 8 #include "base/base_export.h"
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 10
(...skipping 29 matching lines...) Expand all
40 namespace chrome_browser_net { 40 namespace chrome_browser_net {
41 class Predictor; 41 class Predictor;
42 } 42 }
43 namespace content { 43 namespace content {
44 class BrowserGpuChannelHostFactory; 44 class BrowserGpuChannelHostFactory;
45 class BrowserTestBase; 45 class BrowserTestBase;
46 class GLHelper; 46 class GLHelper;
47 class GpuChannelHost; 47 class GpuChannelHost;
48 class RenderWidgetHelper; 48 class RenderWidgetHelper;
49 class TextInputClientMac; 49 class TextInputClientMac;
50
51 class RenderThreadImpl;
52 class CommandBufferProxyImpl;
50 } 53 }
51 namespace dbus { 54 namespace dbus {
52 class Bus; 55 class Bus;
53 } 56 }
54 namespace disk_cache { 57 namespace disk_cache {
55 class BackendImpl; 58 class BackendImpl;
56 class InFlightIO; 59 class InFlightIO;
57 } 60 }
58 namespace media { 61 namespace media {
59 class AudioOutputController; 62 class AudioOutputController;
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 friend class disk_cache::BackendImpl; // http://crbug.com/74623 203 friend class disk_cache::BackendImpl; // http://crbug.com/74623
201 friend class disk_cache::InFlightIO; // http://crbug.com/74623 204 friend class disk_cache::InFlightIO; // http://crbug.com/74623
202 friend class media::AudioOutputController; // http://crbug.com/120973 205 friend class media::AudioOutputController; // http://crbug.com/120973
203 friend class net::FileStreamPosix; // http://crbug.com/115067 206 friend class net::FileStreamPosix; // http://crbug.com/115067
204 friend class net::FileStreamWin; // http://crbug.com/115067 207 friend class net::FileStreamWin; // http://crbug.com/115067
205 friend class net::internal::AddressTrackerLinux; // http://crbug.com/125097 208 friend class net::internal::AddressTrackerLinux; // http://crbug.com/125097
206 friend class ::AcceleratedPresenter; // http://crbug.com/125391 209 friend class ::AcceleratedPresenter; // http://crbug.com/125391
207 friend class ::BrowserProcessImpl; // http://crbug.com/125207 210 friend class ::BrowserProcessImpl; // http://crbug.com/125207
208 friend class ::MetricsService; // http://crbug.com/124954 211 friend class ::MetricsService; // http://crbug.com/124954
209 friend class ::NativeBackendKWallet; // http://crbug.com/125331 212 friend class ::NativeBackendKWallet; // http://crbug.com/125331
213
214 friend class content::RenderThreadImpl;
215 friend class content::CommandBufferProxyImpl;
210 // END USAGE THAT NEEDS TO BE FIXED. 216 // END USAGE THAT NEEDS TO BE FIXED.
211 217
212 #if ENABLE_THREAD_RESTRICTIONS 218 #if ENABLE_THREAD_RESTRICTIONS
213 static bool SetWaitAllowed(bool allowed); 219 static bool SetWaitAllowed(bool allowed);
214 #else 220 #else
215 static bool SetWaitAllowed(bool allowed) { return true; } 221 static bool SetWaitAllowed(bool allowed) { return true; }
216 #endif 222 #endif
217 223
218 // Constructing a ScopedAllowWait temporarily allows waiting on the current 224 // Constructing a ScopedAllowWait temporarily allows waiting on the current
219 // thread. Doing this is almost always incorrect, which is why we limit who 225 // thread. Doing this is almost always incorrect, which is why we limit who
(...skipping 10 matching lines...) Expand all
230 236
231 DISALLOW_COPY_AND_ASSIGN(ScopedAllowWait); 237 DISALLOW_COPY_AND_ASSIGN(ScopedAllowWait);
232 }; 238 };
233 239
234 DISALLOW_IMPLICIT_CONSTRUCTORS(ThreadRestrictions); 240 DISALLOW_IMPLICIT_CONSTRUCTORS(ThreadRestrictions);
235 }; 241 };
236 242
237 } // namespace base 243 } // namespace base
238 244
239 #endif // BASE_THREADING_THREAD_RESTRICTIONS_H_ 245 #endif // BASE_THREADING_THREAD_RESTRICTIONS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698