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

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

Issue 563373002: Always activate MojoApplicationHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re-landing Created 6 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
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>
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 // Called when the existence of the other renderer process which is connected 249 // Called when the existence of the other renderer process which is connected
250 // to the Worker in this renderer process has changed. 250 // to the Worker in this renderer process has changed.
251 // It is only called when "enable-embedded-shared-worker" flag is set. 251 // It is only called when "enable-embedded-shared-worker" flag is set.
252 void IncrementWorkerRefCount(); 252 void IncrementWorkerRefCount();
253 void DecrementWorkerRefCount(); 253 void DecrementWorkerRefCount();
254 254
255 // Call this function to resume the navigation when it was deferred 255 // Call this function to resume the navigation when it was deferred
256 // immediately after receiving response headers. 256 // immediately after receiving response headers.
257 void ResumeResponseDeferredAtStart(const GlobalRequestID& request_id); 257 void ResumeResponseDeferredAtStart(const GlobalRequestID& request_id);
258 258
259 // Activates Mojo for this process. Does nothing if Mojo is already activated.
260 void EnsureMojoActivated();
261
262 // PlzNavigate 259 // PlzNavigate
263 // Returns the time the first call to Init completed successfully (after a new 260 // Returns the time the first call to Init completed successfully (after a new
264 // renderer process was created); further calls to Init won't change this 261 // renderer process was created); further calls to Init won't change this
265 // value. 262 // value.
266 // Note: Will disappear after PlzNavitate is completed. 263 // Note: Will disappear after PlzNavitate is completed.
267 const base::TimeTicks& init_time() const { return init_time_; } 264 const base::TimeTicks& init_time() const { return init_time_; }
268 265
269 protected: 266 protected:
270 // A proxy for our IPC::Channel that lives on the IO thread (see 267 // A proxy for our IPC::Channel that lives on the IO thread (see
271 // browser_process.h) 268 // browser_process.h)
(...skipping 15 matching lines...) Expand all
287 #endif 284 #endif
288 285
289 // The count of currently swapped out but pending RenderViews. We have 286 // The count of currently swapped out but pending RenderViews. We have
290 // started to swap these in, so the renderer process should not exit if 287 // started to swap these in, so the renderer process should not exit if
291 // this count is non-zero. 288 // this count is non-zero.
292 int32 pending_views_; 289 int32 pending_views_;
293 290
294 private: 291 private:
295 friend class VisitRelayingRenderProcessHost; 292 friend class VisitRelayingRenderProcessHost;
296 293
297 void MaybeActivateMojo();
298 bool ShouldUseMojoChannel() const; 294 bool ShouldUseMojoChannel() const;
299 scoped_ptr<IPC::ChannelProxy> CreateChannelProxy( 295 scoped_ptr<IPC::ChannelProxy> CreateChannelProxy(
300 const std::string& channel_id); 296 const std::string& channel_id);
301 297
302 // Creates and adds the IO thread message filters. 298 // Creates and adds the IO thread message filters.
303 void CreateMessageFilters(); 299 void CreateMessageFilters();
304 300
305 // Control message handlers. 301 // Control message handlers.
306 void OnShutdownRequest(); 302 void OnShutdownRequest();
307 void OnDumpHandlesDone(); 303 void OnDumpHandlesDone();
(...skipping 27 matching lines...) Expand all
335 void RegisterAecDumpConsumerOnUIThread(int id); 331 void RegisterAecDumpConsumerOnUIThread(int id);
336 void UnregisterAecDumpConsumerOnUIThread(int id); 332 void UnregisterAecDumpConsumerOnUIThread(int id);
337 void EnableAecDumpForId(const base::FilePath& file, int id); 333 void EnableAecDumpForId(const base::FilePath& file, int id);
338 // Sends |file_for_transit| to the render process. 334 // Sends |file_for_transit| to the render process.
339 void SendAecDumpFileToRenderer(int id, 335 void SendAecDumpFileToRenderer(int id,
340 IPC::PlatformFileForTransit file_for_transit); 336 IPC::PlatformFileForTransit file_for_transit);
341 void SendDisableAecDumpToRenderer(); 337 void SendDisableAecDumpToRenderer();
342 #endif 338 #endif
343 339
344 scoped_ptr<MojoApplicationHost> mojo_application_host_; 340 scoped_ptr<MojoApplicationHost> mojo_application_host_;
345 bool mojo_activation_required_;
346 341
347 // The registered IPC listener objects. When this list is empty, we should 342 // The registered IPC listener objects. When this list is empty, we should
348 // delete ourselves. 343 // delete ourselves.
349 IDMap<IPC::Listener> listeners_; 344 IDMap<IPC::Listener> listeners_;
350 345
351 // The count of currently visible widgets. Since the host can be a container 346 // The count of currently visible widgets. Since the host can be a container
352 // for multiple widgets, it uses this count to determine when it should be 347 // for multiple widgets, it uses this count to determine when it should be
353 // backgrounded. 348 // backgrounded.
354 int32 visible_widgets_; 349 int32 visible_widgets_;
355 350
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 base::TimeTicks survive_for_worker_start_time_; 462 base::TimeTicks survive_for_worker_start_time_;
468 463
469 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; 464 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_;
470 465
471 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); 466 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl);
472 }; 467 };
473 468
474 } // namespace content 469 } // namespace content
475 470
476 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ 471 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/mojo/mojo_application_host.cc ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698