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

Side by Side Diff: content/renderer/render_thread_impl.h

Issue 23694031: Fix race conditions in window snapshot code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added screenshot sync test to telemetry unittests, updated cc unittest Created 7 years, 2 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 CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ 5 #ifndef CONTENT_RENDERER_RENDER_THREAD_IMPL_H_
6 #define CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ 6 #define CONTENT_RENDERER_RENDER_THREAD_IMPL_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/memory/memory_pressure_listener.h" 12 #include "base/memory/memory_pressure_listener.h"
13 #include "base/observer_list.h" 13 #include "base/observer_list.h"
14 #include "base/process/process_handle.h"
14 #include "base/strings/string16.h" 15 #include "base/strings/string16.h"
15 #include "base/timer/timer.h" 16 #include "base/timer/timer.h"
16 #include "build/build_config.h" 17 #include "build/build_config.h"
17 #include "content/child/child_thread.h" 18 #include "content/child/child_thread.h"
18 #include "content/common/content_export.h" 19 #include "content/common/content_export.h"
19 #include "content/common/gpu/client/gpu_channel_host.h" 20 #include "content/common/gpu/client/gpu_channel_host.h"
20 #include "content/common/gpu/gpu_process_launch_causes.h" 21 #include "content/common/gpu/gpu_process_launch_causes.h"
21 #include "content/public/renderer/render_thread.h" 22 #include "content/public/renderer/render_thread.h"
22 #include "content/renderer/media/renderer_gpu_video_accelerator_factories.h" 23 #include "content/renderer/media/renderer_gpu_video_accelerator_factories.h"
23 #include "ipc/ipc_channel_proxy.h" 24 #include "ipc/ipc_channel_proxy.h"
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 HistogramCustomizer* histogram_customizer() { 339 HistogramCustomizer* histogram_customizer() {
339 return &histogram_customizer_; 340 return &histogram_customizer_;
340 } 341 }
341 342
342 void SetFlingCurveParameters(const std::vector<float>& new_touchpad, 343 void SetFlingCurveParameters(const std::vector<float>& new_touchpad,
343 const std::vector<float>& new_touchscreen); 344 const std::vector<float>& new_touchscreen);
344 345
345 // Retrieve current gamepad data. 346 // Retrieve current gamepad data.
346 void SampleGamepads(WebKit::WebGamepads* data); 347 void SampleGamepads(WebKit::WebGamepads* data);
347 348
349 // Get the browser process's notion of the renderer process's ID.
350 // This is the first argument to RenderWidgetHost::FromID. Ideally
351 // this would be available on all platforms via base::Process.
352 base::ProcessId renderer_process_id() const;
353
348 private: 354 private:
349 // ChildThread 355 // ChildThread
350 virtual bool OnControlMessageReceived(const IPC::Message& msg) OVERRIDE; 356 virtual bool OnControlMessageReceived(const IPC::Message& msg) OVERRIDE;
351 357
352 // GpuChannelHostFactory implementation: 358 // GpuChannelHostFactory implementation:
353 virtual bool IsMainThread() OVERRIDE; 359 virtual bool IsMainThread() OVERRIDE;
354 virtual base::MessageLoop* GetMainLoop() OVERRIDE; 360 virtual base::MessageLoop* GetMainLoop() OVERRIDE;
355 virtual scoped_refptr<base::MessageLoopProxy> GetIOLoopProxy() OVERRIDE; 361 virtual scoped_refptr<base::MessageLoopProxy> GetIOLoopProxy() OVERRIDE;
356 virtual base::WaitableEvent* GetShutDownEvent() OVERRIDE; 362 virtual base::WaitableEvent* GetShutDownEvent() OVERRIDE;
357 virtual scoped_ptr<base::SharedMemory> AllocateSharedMemory( 363 virtual scoped_ptr<base::SharedMemory> AllocateSharedMemory(
(...skipping 11 matching lines...) Expand all
369 375
370 void OnSetZoomLevelForCurrentURL(const std::string& scheme, 376 void OnSetZoomLevelForCurrentURL(const std::string& scheme,
371 const std::string& host, 377 const std::string& host,
372 double zoom_level); 378 double zoom_level);
373 void OnCreateNewView(const ViewMsg_New_Params& params); 379 void OnCreateNewView(const ViewMsg_New_Params& params);
374 void OnTransferBitmap(const SkBitmap& bitmap, int resource_id); 380 void OnTransferBitmap(const SkBitmap& bitmap, int resource_id);
375 void OnPurgePluginListCache(bool reload_pages); 381 void OnPurgePluginListCache(bool reload_pages);
376 void OnNetworkStateChanged(bool online); 382 void OnNetworkStateChanged(bool online);
377 void OnGetAccessibilityTree(); 383 void OnGetAccessibilityTree();
378 void OnTempCrashWithData(const GURL& data); 384 void OnTempCrashWithData(const GURL& data);
385 void OnSetRendererProcessID(int64 process_id);
379 void OnSetWebKitSharedTimersSuspended(bool suspend); 386 void OnSetWebKitSharedTimersSuspended(bool suspend);
380 void OnMemoryPressure( 387 void OnMemoryPressure(
381 base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level); 388 base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level);
382 389
383 void IdleHandlerInForegroundTab(); 390 void IdleHandlerInForegroundTab();
384 391
385 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> CreateOffscreenContext3d(); 392 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> CreateOffscreenContext3d();
386 393
387 // These objects live solely on the render thread. 394 // These objects live solely on the render thread.
388 scoped_ptr<AppCacheDispatcher> appcache_dispatcher_; 395 scoped_ptr<AppCacheDispatcher> appcache_dispatcher_;
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 scoped_ptr<media::AudioHardwareConfig> audio_hardware_config_; 489 scoped_ptr<media::AudioHardwareConfig> audio_hardware_config_;
483 490
484 HistogramCustomizer histogram_customizer_; 491 HistogramCustomizer histogram_customizer_;
485 492
486 scoped_ptr<base::MemoryPressureListener> memory_pressure_listener_; 493 scoped_ptr<base::MemoryPressureListener> memory_pressure_listener_;
487 494
488 scoped_ptr<WebRTCIdentityService> webrtc_identity_service_; 495 scoped_ptr<WebRTCIdentityService> webrtc_identity_service_;
489 496
490 scoped_ptr<GamepadSharedMemoryReader> gamepad_shared_memory_reader_; 497 scoped_ptr<GamepadSharedMemoryReader> gamepad_shared_memory_reader_;
491 498
499 base::ProcessId renderer_process_id_;
500
492 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); 501 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl);
493 }; 502 };
494 503
495 } // namespace content 504 } // namespace content
496 505
497 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ 506 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698