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

Unified Diff: chrome/browser/ui/browser_navigator.cc

Issue 10105030: TabContents -> WebContentsImpl, part 21. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/browser_navigator.h ('k') | chrome/browser/ui/browser_navigator_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_navigator.cc
diff --git a/chrome/browser/ui/browser_navigator.cc b/chrome/browser/ui/browser_navigator.cc
index 3154eeca42d07718204429f25dac0bb7fda7fda1..be1adbb8a9887fb00a38759aae38daea881834c0 100644
--- a/chrome/browser/ui/browser_navigator.cc
+++ b/chrome/browser/ui/browser_navigator.cc
@@ -112,9 +112,10 @@ bool AdjustNavigateParamsForURL(browser::NavigateParams* params) {
// |params|. This might just return the same Browser specified in |params|, or
// some other if that Browser is deemed incompatible.
Browser* GetBrowserForDisposition(browser::NavigateParams* params) {
- // If no source TabContents was specified, we use the selected one from the
- // target browser. This must happen first, before GetBrowserForDisposition()
- // has a chance to replace |params->browser| with another one.
+ // If no source TabContentsWrapper was specified, we use the selected one from
+ // the target browser. This must happen first, before
+ // GetBrowserForDisposition() has a chance to replace |params->browser| with
+ // another one.
if (!params->source_contents && params->browser)
params->source_contents =
params->browser->GetSelectedTabContentsWrapper();
@@ -297,13 +298,13 @@ class ScopedBrowserDisplayer {
DISALLOW_COPY_AND_ASSIGN(ScopedBrowserDisplayer);
};
-// This class manages the lifetime of a TabContents created by the Navigate()
-// function. When Navigate() creates a TabContents for a URL, an instance of
-// this class takes ownership of it via TakeOwnership() until the TabContents
-// is added to a tab strip at which time ownership is relinquished via
-// ReleaseOwnership(). If this object goes out of scope without being added
-// to a tab strip, the created TabContents is deleted to avoid a leak and the
-// params->target_contents field is set to NULL.
+// This class manages the lifetime of a TabContentsWrapper created by the
+// Navigate() function. When Navigate() creates a TabContentsWrapper for a URL,
+// an instance of this class takes ownership of it via TakeOwnership() until the
+// TabContentsWrapper is added to a tab strip at which time ownership is
+// relinquished via ReleaseOwnership(). If this object goes out of scope without
+// being added to a tab strip, the created TabContentsWrapper is deleted to
+// avoid a leak and the params->target_contents field is set to NULL.
class ScopedTargetContentsOwner {
public:
explicit ScopedTargetContentsOwner(browser::NavigateParams* params)
@@ -460,7 +461,7 @@ void Navigate(NavigateParams* params) {
// Make sure the Browser is shown if params call for it.
ScopedBrowserDisplayer displayer(params);
- // Makes sure any TabContents created by this function is destroyed if
+ // Makes sure any TabContentsWrapper created by this function is destroyed if
// not properly added to a tab strip.
ScopedTargetContentsOwner target_contents_owner(params);
@@ -482,7 +483,7 @@ void Navigate(NavigateParams* params) {
}
// Determine if the navigation was user initiated. If it was, we need to
- // inform the target TabContents, and we may need to update the UI.
+ // inform the target TabContentsWrapper, and we may need to update the UI.
content::PageTransition base_transition =
content::PageTransitionStripQualifier(params->transition);
bool user_initiated =
@@ -499,8 +500,9 @@ void Navigate(NavigateParams* params) {
// Check if this is a singleton tab that already exists
int singleton_index = GetIndexOfSingletonTab(params);
- // If no target TabContents was specified, we need to construct one if we are
- // supposed to target a new tab; unless it's a singleton that already exists.
+ // If no target TabContentsWrapper was specified, we need to construct one if
+ // we are supposed to target a new tab; unless it's a singleton that already
+ // exists.
if (!params->target_contents && singleton_index < 0) {
GURL url;
if (params->url.is_empty()) {
« no previous file with comments | « chrome/browser/ui/browser_navigator.h ('k') | chrome/browser/ui/browser_navigator_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698