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

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.h

Issue 273523007: Dispatch geolocation IPCs on the UI thread. Aside from simplifying the code to avoid a lot of threa… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: review comments 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 | 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_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <queue> 9 #include <queue>
10 #include <string> 10 #include <string>
11 11
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/observer_list.h" 13 #include "base/observer_list.h"
14 #include "base/process/process.h" 14 #include "base/process/process.h"
15 #include "base/timer/timer.h" 15 #include "base/timer/timer.h"
16 #include "content/browser/child_process_launcher.h" 16 #include "content/browser/child_process_launcher.h"
17 #include "content/browser/geolocation/geolocation_dispatcher_host.h"
18 #include "content/browser/power_monitor_message_broadcaster.h" 17 #include "content/browser/power_monitor_message_broadcaster.h"
19 #include "content/common/content_export.h" 18 #include "content/common/content_export.h"
20 #include "content/public/browser/gpu_data_manager_observer.h" 19 #include "content/public/browser/gpu_data_manager_observer.h"
21 #include "content/public/browser/render_process_host.h" 20 #include "content/public/browser/render_process_host.h"
22 #include "ipc/ipc_channel_proxy.h" 21 #include "ipc/ipc_channel_proxy.h"
23 #include "ipc/ipc_platform_file.h" 22 #include "ipc/ipc_platform_file.h"
24 #include "mojo/embedder/scoped_platform_handle.h" 23 #include "mojo/embedder/scoped_platform_handle.h"
25 #include "mojo/public/cpp/bindings/remote_ptr.h" 24 #include "mojo/public/cpp/bindings/remote_ptr.h"
26 #include "mojo/public/interfaces/shell/shell.mojom.h" 25 #include "mojo/public/interfaces/shell/shell.mojom.h"
27 26
28 struct ViewHostMsg_CompositorSurfaceBuffersSwapped_Params; 27 struct ViewHostMsg_CompositorSurfaceBuffersSwapped_Params;
29 28
30 namespace base { 29 namespace base {
31 class CommandLine; 30 class CommandLine;
32 class MessageLoop; 31 class MessageLoop;
33 } 32 }
34 33
35 namespace gfx { 34 namespace gfx {
36 class Size; 35 class Size;
37 } 36 }
38 37
39 namespace content { 38 namespace content {
40 class AudioRendererHost; 39 class AudioRendererHost;
41 class BrowserDemuxerAndroid; 40 class BrowserDemuxerAndroid;
42 class GeolocationDispatcherHost;
43 class GpuMessageFilter; 41 class GpuMessageFilter;
44 class MessagePortMessageFilter; 42 class MessagePortMessageFilter;
45 class MojoApplicationHost; 43 class MojoApplicationHost;
46 class PeerConnectionTrackerHost; 44 class PeerConnectionTrackerHost;
47 class RendererMainThread; 45 class RendererMainThread;
48 class RenderProcessHostMojoImpl; 46 class RenderProcessHostMojoImpl;
49 class RenderWidgetHelper; 47 class RenderWidgetHelper;
50 class RenderWidgetHost; 48 class RenderWidgetHost;
51 class RenderWidgetHostImpl; 49 class RenderWidgetHostImpl;
52 class RenderWidgetHostViewFrameSubscriber; 50 class RenderWidgetHostViewFrameSubscriber;
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 // any RenderViewHosts that are swapped out. 156 // any RenderViewHosts that are swapped out.
159 int GetActiveViewCount(); 157 int GetActiveViewCount();
160 158
161 // Start and end frame subscription for a specific renderer. 159 // Start and end frame subscription for a specific renderer.
162 // This API only supports subscription to accelerated composited frames. 160 // This API only supports subscription to accelerated composited frames.
163 void BeginFrameSubscription( 161 void BeginFrameSubscription(
164 int route_id, 162 int route_id,
165 scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber); 163 scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber);
166 void EndFrameSubscription(int route_id); 164 void EndFrameSubscription(int route_id);
167 165
168 scoped_refptr<GeolocationDispatcherHost>
169 geolocation_dispatcher_host() const {
170 return make_scoped_refptr(geolocation_dispatcher_host_);
171 }
172
173 #if defined(ENABLE_WEBRTC) 166 #if defined(ENABLE_WEBRTC)
174 // Fires the webrtc log message callback with |message|, if callback is set. 167 // Fires the webrtc log message callback with |message|, if callback is set.
175 void WebRtcLogMessage(const std::string& message); 168 void WebRtcLogMessage(const std::string& message);
176 #endif 169 #endif
177 170
178 scoped_refptr<ScreenOrientationDispatcherHost> 171 scoped_refptr<ScreenOrientationDispatcherHost>
179 screen_orientation_dispatcher_host() const; 172 screen_orientation_dispatcher_host() const;
180 173
181 // Register/unregister the host identified by the host id in the global host 174 // Register/unregister the host identified by the host id in the global host
182 // list. 175 // list.
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 397
405 // Forwards power state messages to the renderer process. 398 // Forwards power state messages to the renderer process.
406 PowerMonitorMessageBroadcaster power_monitor_broadcaster_; 399 PowerMonitorMessageBroadcaster power_monitor_broadcaster_;
407 400
408 scoped_refptr<AudioRendererHost> audio_renderer_host_; 401 scoped_refptr<AudioRendererHost> audio_renderer_host_;
409 402
410 #if defined(OS_ANDROID) 403 #if defined(OS_ANDROID)
411 scoped_refptr<BrowserDemuxerAndroid> browser_demuxer_android_; 404 scoped_refptr<BrowserDemuxerAndroid> browser_demuxer_android_;
412 #endif 405 #endif
413 406
414 // Message filter for geolocation messages.
415 GeolocationDispatcherHost* geolocation_dispatcher_host_;
416
417 #if defined(ENABLE_WEBRTC) 407 #if defined(ENABLE_WEBRTC)
418 base::Callback<void(const std::string&)> webrtc_log_message_callback_; 408 base::Callback<void(const std::string&)> webrtc_log_message_callback_;
419 #endif 409 #endif
420 410
421 // Message filter and dispatcher for screen orientation. 411 // Message filter and dispatcher for screen orientation.
422 ScreenOrientationDispatcherHost* screen_orientation_dispatcher_host_; 412 ScreenOrientationDispatcherHost* screen_orientation_dispatcher_host_;
423 413
424 int worker_ref_count_; 414 int worker_ref_count_;
425 415
426 // Records the time when the process starts surviving for workers for UMA. 416 // Records the time when the process starts surviving for workers for UMA.
427 base::TimeTicks survive_for_worker_start_time_; 417 base::TimeTicks survive_for_worker_start_time_;
428 418
429 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; 419 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_;
430 420
431 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); 421 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl);
432 }; 422 };
433 423
434 } // namespace content 424 } // namespace content
435 425
436 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ 426 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698