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

Side by Side Diff: content/browser/tab_contents/render_view_host_manager.cc

Issue 8253002: Move PageTransition into content namespace. While I'm touching all these files, I've also updated... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "content/browser/tab_contents/render_view_host_manager.h" 5 #include "content/browser/tab_contents/render_view_host_manager.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "content/browser/content_browser_client.h" 9 #include "content/browser/content_browser_client.h"
10 #include "content/browser/renderer_host/render_view_host.h" 10 #include "content/browser/renderer_host/render_view_host.h"
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 // 401 //
402 // If this navigation is generated, then it probably corresponds to a search 402 // If this navigation is generated, then it probably corresponds to a search
403 // query. Given that search results typically lead to users navigating to 403 // query. Given that search results typically lead to users navigating to
404 // other sites, we don't really want to use the search engine hostname to 404 // other sites, we don't really want to use the search engine hostname to
405 // determine the site instance for this navigation. 405 // determine the site instance for this navigation.
406 // 406 //
407 // NOTE: This can be removed once we have a way to transition between 407 // NOTE: This can be removed once we have a way to transition between
408 // RenderViews in response to a link click. 408 // RenderViews in response to a link click.
409 // 409 //
410 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kProcessPerSite) && 410 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kProcessPerSite) &&
411 entry.transition_type() == PageTransition::GENERATED) 411 entry.transition_type() == content::PAGE_TRANSITION_GENERATED)
412 return curr_instance; 412 return curr_instance;
413 413
414 // If we haven't used our SiteInstance (and thus RVH) yet, then we can use it 414 // If we haven't used our SiteInstance (and thus RVH) yet, then we can use it
415 // for this entry. We won't commit the SiteInstance to this site until the 415 // for this entry. We won't commit the SiteInstance to this site until the
416 // navigation commits (in DidNavigate), unless the navigation entry was 416 // navigation commits (in DidNavigate), unless the navigation entry was
417 // restored or it's a Web UI as described below. 417 // restored or it's a Web UI as described below.
418 if (!curr_instance->has_site()) { 418 if (!curr_instance->has_site()) {
419 // If we've already created a SiteInstance for our destination, we don't 419 // If we've already created a SiteInstance for our destination, we don't
420 // want to use this unused SiteInstance; use the existing one. (We don't 420 // want to use this unused SiteInstance; use the existing one. (We don't
421 // do this check if the curr_instance has a site, because for now, we want 421 // do this check if the curr_instance has a site, because for now, we want
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 } 801 }
802 } 802 }
803 803
804 bool RenderViewHostManager::IsSwappedOut(RenderViewHost* rvh) { 804 bool RenderViewHostManager::IsSwappedOut(RenderViewHost* rvh) {
805 if (!rvh->site_instance()) 805 if (!rvh->site_instance())
806 return false; 806 return false;
807 807
808 return swapped_out_hosts_.find(rvh->site_instance()->id()) != 808 return swapped_out_hosts_.find(rvh->site_instance()->id()) !=
809 swapped_out_hosts_.end(); 809 swapped_out_hosts_.end();
810 } 810 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698