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

Side by Side Diff: content/browser/frame_host/render_frame_host_manager.h

Issue 743773003: OOPIF: Data URLs are now rendered in the renderer that initiated the navigation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_
7 7
8 #include <list> 8 #include <list>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 // to |bindings|. 412 // to |bindings|.
413 scoped_ptr<WebUIImpl> CreateWebUI(const GURL& url, int bindings); 413 scoped_ptr<WebUIImpl> CreateWebUI(const GURL& url, int bindings);
414 414
415 // Returns true if it is safe to reuse the current WebUI when navigating from 415 // Returns true if it is safe to reuse the current WebUI when navigating from
416 // |current_entry| to |new_url|. 416 // |current_entry| to |new_url|.
417 bool ShouldReuseWebUI( 417 bool ShouldReuseWebUI(
418 const NavigationEntry* current_entry, 418 const NavigationEntry* current_entry,
419 const GURL& new_url) const; 419 const GURL& new_url) const;
420 420
421 // Returns the SiteInstance to use for the navigation. 421 // Returns the SiteInstance to use for the navigation.
422 SiteInstance* GetSiteInstanceForNavigation( 422 SiteInstance* GetSiteInstanceForNavigation(const GURL& dest_url,
423 const GURL& dest_url, 423 SiteInstance* source_instance,
424 SiteInstance* dest_instance, 424 SiteInstance* dest_instance,
425 ui::PageTransition dest_transition, 425 ui::PageTransition transition,
426 bool dest_is_restore, 426 bool dest_is_restore,
427 bool dest_is_view_source_mode); 427 bool dest_is_view_source_mode);
428 428
429 // Returns an appropriate SiteInstance object for the given |dest_url|, 429 // Returns an appropriate SiteInstance object for the given |dest_url|,
430 // possibly reusing the current SiteInstance. If --process-per-tab is used, 430 // possibly reusing the current SiteInstance. If --process-per-tab is used,
431 // this is only called when ShouldSwapBrowsingInstancesForNavigation returns 431 // this is only called when ShouldSwapBrowsingInstancesForNavigation returns
432 // true. |dest_instance| will be used if it is not null. 432 // true.
433 // |source_instance| is the SiteInstance of the frame that initiated the
434 // navigation.
435 // |current_instance| is the SiteInstance of the frame that is currently
436 // navigating.
437 // |dest_instance|, if not null, is a predetermined SiteInstance that'll be
438 // used for the resulting frame.
Charlie Reis 2014/12/09 19:14:37 nit: "resulting frame" seems to imply it could end
lfg 2014/12/10 21:53:00 Done.
433 // This is a helper function for GetSiteInstanceForNavigation. 439 // This is a helper function for GetSiteInstanceForNavigation.
434 SiteInstance* GetSiteInstanceForURL( 440 SiteInstance* GetSiteInstanceForURL(const GURL& dest_url,
435 const GURL& dest_url, 441 SiteInstance* source_instance,
436 SiteInstance* dest_instance, 442 SiteInstance* current_instance,
437 ui::PageTransition dest_transition, 443 SiteInstance* dest_instance,
438 bool dest_is_restore, 444 ui::PageTransition transition,
439 bool dest_is_view_source_mode, 445 bool dest_is_restore,
440 SiteInstance* current_instance, 446 bool dest_is_view_source_mode,
441 bool force_browsing_instance_swap); 447 bool force_browsing_instance_swap);
442 448
443 // Determines the appropriate url to use as the current url for SiteInstance 449 // Determines the appropriate url to use as the current url for SiteInstance
444 // selection. 450 // selection.
445 const GURL& GetCurrentURLForSiteInstance( 451 const GURL& GetCurrentURLForSiteInstance(
446 SiteInstance* current_instance, 452 SiteInstance* current_instance,
447 NavigationEntry* current_entry); 453 NavigationEntry* current_entry);
448 454
449 // Creates a new RenderFrameHostImpl for the |new_instance| and assign it to 455 // Creates a new RenderFrameHostImpl for the |new_instance| and assign it to
450 // |pending_render_frame_host_| while respecting the opener route if needed 456 // |pending_render_frame_host_| while respecting the opener route if needed
451 // and stores it in pending_render_frame_host_. 457 // and stores it in pending_render_frame_host_.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 514
509 // Helper method to terminate the pending RenderViewHost. 515 // Helper method to terminate the pending RenderViewHost.
510 void CancelPending(); 516 void CancelPending();
511 517
512 // Helper method to set the active RenderFrameHost. Returns the old 518 // Helper method to set the active RenderFrameHost. Returns the old
513 // RenderFrameHost and updates counts. 519 // RenderFrameHost and updates counts.
514 scoped_ptr<RenderFrameHostImpl> SetRenderFrameHost( 520 scoped_ptr<RenderFrameHostImpl> SetRenderFrameHost(
515 scoped_ptr<RenderFrameHostImpl> render_frame_host); 521 scoped_ptr<RenderFrameHostImpl> render_frame_host);
516 522
517 RenderFrameHostImpl* UpdateStateForNavigate( 523 RenderFrameHostImpl* UpdateStateForNavigate(
518 const GURL& url, 524 const GURL& dest_url,
519 SiteInstance* instance, 525 SiteInstance* source_instance,
526 SiteInstance* dest_instance,
520 ui::PageTransition transition, 527 ui::PageTransition transition,
521 bool is_restore, 528 bool dest_is_restore,
522 bool is_view_source_mode, 529 bool dest_is_view_source_mode,
523 const GlobalRequestID& transferred_request_id, 530 const GlobalRequestID& transferred_request_id,
524 int bindings); 531 int bindings);
525 532
526 // Called when a renderer process is starting to close. We should not 533 // Called when a renderer process is starting to close. We should not
527 // schedule new navigations in its swapped out RenderFrameHosts after this. 534 // schedule new navigations in its swapped out RenderFrameHosts after this.
528 void RendererProcessClosing(RenderProcessHost* render_process_host); 535 void RendererProcessClosing(RenderProcessHost* render_process_host);
529 536
530 // Helper method to delete a RenderFrameProxyHost from the list, if one exists 537 // Helper method to delete a RenderFrameProxyHost from the list, if one exists
531 // for the given |instance|. 538 // for the given |instance|.
532 void DeleteRenderFrameProxyHost(SiteInstance* instance); 539 void DeleteRenderFrameProxyHost(SiteInstance* instance);
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 NotificationRegistrar registrar_; 608 NotificationRegistrar registrar_;
602 609
603 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_; 610 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_;
604 611
605 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager); 612 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager);
606 }; 613 };
607 614
608 } // namespace content 615 } // namespace content
609 616
610 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ 617 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698