summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-17 20:05:55 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-17 20:05:55 +0000
commit075969dc52d6b35c2607eb8078c33b3eedbef4c7 (patch)
tree3e5e756cbfbf4e2cae628583626518be7652dc94
parent56b9bfa52b413e42e522cc42354e1af5acada6a8 (diff)
downloadchromium_src-075969dc52d6b35c2607eb8078c33b3eedbef4c7.zip
chromium_src-075969dc52d6b35c2607eb8078c33b3eedbef4c7.tar.gz
chromium_src-075969dc52d6b35c2607eb8078c33b3eedbef4c7.tar.bz2
TabContents -> WebContentsImpl, part 21.
TabContents -> WebContents in chrome/, part 4. BUG=105875 TEST=no change Review URL: https://chromiumcodereview.appspot.com/10105030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132629 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/tabs/tab_strip_model.h152
-rw-r--r--chrome/browser/tabs/tab_strip_model_delegate.h20
-rw-r--r--chrome/browser/tabs/tab_strip_model_observer.h27
-rw-r--r--chrome/browser/tabs/tab_strip_model_unittest.cc24
-rw-r--r--chrome/browser/task_manager/task_manager.cc2
-rw-r--r--chrome/browser/task_manager/task_manager.h4
-rw-r--r--chrome/browser/task_manager/task_manager_resource_providers.cc8
-rw-r--r--chrome/browser/translate/translate_manager.cc2
-rw-r--r--chrome/browser/translate/translate_manager_browsertest.cc4
-rw-r--r--chrome/browser/ui/app_modal_dialogs/app_modal_dialog_queue.cc2
-rw-r--r--chrome/browser/ui/auto_login_prompter.cc2
-rw-r--r--chrome/browser/ui/blocked_content/blocked_content_container.cc2
-rw-r--r--chrome/browser/ui/blocked_content/blocked_content_container.h15
-rw-r--r--chrome/browser/ui/blocked_content/blocked_content_tab_helper.h15
-rw-r--r--chrome/browser/ui/bookmarks/bookmark_tab_helper.cc2
-rw-r--r--chrome/browser/ui/browser.cc26
-rw-r--r--chrome/browser/ui/browser.h18
-rw-r--r--chrome/browser/ui/browser_list.cc10
-rw-r--r--chrome/browser/ui/browser_list.h14
-rw-r--r--chrome/browser/ui/browser_navigator.cc30
-rw-r--r--chrome/browser/ui/browser_navigator.h34
-rw-r--r--chrome/browser/ui/browser_navigator_browsertest.cc8
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller_unittest.mm2
-rw-r--r--chrome/browser/ui/cocoa/constrained_window_mac.mm2
-rw-r--r--chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.h2
-rw-r--r--chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/infobars/infobar_container_controller.h2
-rw-r--r--chrome/browser/ui/cocoa/js_modal_dialog_cocoa.mm2
-rw-r--r--chrome/browser/ui/cocoa/location_bar/content_setting_decoration.mm2
29 files changed, 224 insertions, 213 deletions
diff --git a/chrome/browser/tabs/tab_strip_model.h b/chrome/browser/tabs/tab_strip_model.h
index 29181a4..1f856b5 100644
--- a/chrome/browser/tabs/tab_strip_model.h
+++ b/chrome/browser/tabs/tab_strip_model.h
@@ -30,9 +30,9 @@ class WebContents;
// TabStripModel
//
// A model & low level controller of a Browser Window tabstrip. Holds a vector
-// of TabContents, and provides an API for adding, removing and shuffling
-// them, as well as a higher level API for doing specific Browser-related
-// tasks like adding new Tabs from just a URL, etc.
+// of TabContentsWrappers, and provides an API for adding, removing and
+// shuffling them, as well as a higher level API for doing specific Browser-
+// related tasks like adding new Tabs from just a URL, etc.
//
// Each tab may be any one of the following states:
// . Mini-tab. Mini tabs are locked to the left side of the tab strip and
@@ -77,7 +77,7 @@ class TabStripModel : public content::NotificationObserver {
CLOSE_NONE = 0,
// Indicates the tab was closed by the user. If true,
- // TabContents::SetClosedByUserGesture(true) is invoked.
+ // WebContents::SetClosedByUserGesture(true) is invoked.
CLOSE_USER_GESTURE = 1 << 0,
// If true the history is recorded so that the tab can be reopened later.
@@ -97,9 +97,9 @@ class TabStripModel : public content::NotificationObserver {
// The tab should be pinned.
ADD_PINNED = 1 << 1,
- // If not set the insertion index of the TabContents is left up to the Order
- // Controller associated, so the final insertion index may differ from the
- // specified index. Otherwise the index supplied is used.
+ // If not set the insertion index of the TabContentsWrapper is left up to
+ // the Order Controller associated, so the final insertion index may differ
+ // from the specified index. Otherwise the index supplied is used.
ADD_FORCE_INDEX = 1 << 2,
// If set the newly inserted tab inherits the group of the currently
@@ -134,7 +134,7 @@ class TabStripModel : public content::NotificationObserver {
// Retrieve the Profile associated with this TabStripModel.
Profile* profile() const { return profile_; }
- // Retrieve the index of the currently active TabContents.
+ // Retrieve the index of the currently active TabContentsWrapper.
int active_index() const { return selection_model_.active(); }
// Returns true if the tabstrip is currently closing all open tabs (via a
@@ -161,12 +161,12 @@ class TabStripModel : public content::NotificationObserver {
// Determines if the specified index is contained within the TabStripModel.
bool ContainsIndex(int index) const;
- // Adds the specified TabContents in the default location. Tabs opened in the
- // foreground inherit the group of the previously active tab.
+ // Adds the specified TabContentsWrapper in the default location. Tabs opened
+ // in the foreground inherit the group of the previously active tab.
void AppendTabContents(TabContentsWrapper* contents, bool foreground);
- // Adds the specified TabContents at the specified location. |add_types| is a
- // bitmask of AddTypes; see it for details.
+ // Adds the specified TabContentsWrapper at the specified location.
+ // |add_types| is a bitmask of AddTypes; see it for details.
//
// All append/insert methods end up in this method.
//
@@ -179,12 +179,12 @@ class TabStripModel : public content::NotificationObserver {
TabContentsWrapper* contents,
int add_types);
- // Closes the TabContents at the specified index. This causes the TabContents
- // to be destroyed, but it may not happen immediately (e.g. if it's a
- // TabContents). |close_types| is a bitmask of CloseTypes.
- // Returns true if the TabContents was closed immediately, false if it was not
- // closed (we may be waiting for a response from an onunload handler, or
- // waiting for the user to confirm closure).
+ // Closes the TabContentsWrapper at the specified index. This causes the
+ // TabContentsWrapper to be destroyed, but it may not happen immediately.
+ // |close_types| is a bitmask of CloseTypes. Returns true if the
+ // TabContentsWrapper was closed immediately, false if it was not closed (we
+ // may be waiting for a response from an onunload handler, or waiting for the
+ // user to confirm closure).
bool CloseTabContentsAt(int index, uint32 close_types);
// Replaces the entire state of a the tab at index by switching in a
@@ -204,15 +204,15 @@ class TabStripModel : public content::NotificationObserver {
TabContentsWrapper* ReplaceTabContentsAt(int index,
TabContentsWrapper* new_contents);
- // Destroys the TabContents at the specified index, but keeps the tab visible
- // in the tab strip. Used to free memory in low-memory conditions, especially
- // on Chrome OS. The tab reloads if the user clicks on it.
+ // Destroys the TabContentsWrapper at the specified index, but keeps the tab
+ // visible in the tab strip. Used to free memory in low-memory conditions,
+ // especially on Chrome OS. The tab reloads if the user clicks on it.
// Returns an empty TabContentsWrapper, used only for testing.
TabContentsWrapper* DiscardTabContentsAt(int index);
- // Detaches the TabContents at the specified index from this strip. The
- // TabContents is not destroyed, just removed from display. The caller is
- // responsible for doing something with it (e.g. stuffing it into another
+ // Detaches the TabContentsWrapper at the specified index from this strip. The
+ // TabContentsWrapper is not destroyed, just removed from display. The caller
+ // is responsible for doing something with it (e.g. stuffing it into another
// strip).
TabContentsWrapper* DetachTabContentsAt(int index);
@@ -226,9 +226,9 @@ class TabStripModel : public content::NotificationObserver {
// active tab index.
void AddTabAtToSelection(int index);
- // Move the TabContents at the specified index to another index. This method
- // does NOT send Detached/Attached notifications, rather it moves the
- // TabContents inline and sends a Moved notification instead.
+ // Move the TabContentsWrapper at the specified index to another index. This
+ // method does NOT send Detached/Attached notifications, rather it moves the
+ // TabContentsWrapper inline and sends a Moved notification instead.
// If |select_after_move| is false, whatever tab was selected before the move
// will still be selected, but it's index may have incremented or decremented
// one slot.
@@ -254,23 +254,24 @@ class TabStripModel : public content::NotificationObserver {
// 1)
void MoveSelectedTabsTo(int index);
- // Returns the currently active TabContents, or NULL if there is none.
+ // Returns the currently active TabContentsWrapper, or NULL if there is none.
TabContentsWrapper* GetActiveTabContents() const;
// Returns the TabContentsWrapper at the specified index, or NULL if there is
// none.
TabContentsWrapper* GetTabContentsAt(int index) const;
- // Returns the index of the specified TabContents wrapper, or
- // TabStripModel::kNoTab if the TabContents is not in this TabStripModel.
+ // Returns the index of the specified TabContentsWrapper, or
+ // TabStripModel::kNoTab if the TabContentsWrapper is not in this
+ // TabStripModel.
int GetIndexOfTabContents(const TabContentsWrapper* contents) const;
- // Returns the index of the specified WebContents wrapper given its raw
- // WebContents, or TabStripModel::kNoTab if the TabContents is not in this
+ // Returns the index of the specified TabContentsWrapper given its raw
+ // WebContents, or TabStripModel::kNoTab if the WebContents is not in this
// TabStripModel. Note: This is only needed in rare cases where the wrapper
// is not already present (such as implementing WebContentsDelegate methods,
// which don't know about the wrapper. Returns NULL if |contents| is not
- // associated with any wrapper in the model.
+ // associated with any TabContentsWrapper in the model.
int GetWrapperIndex(const content::WebContents* contents) const;
// Returns the index of the specified NavigationController, or kNoTab if it is
@@ -278,7 +279,7 @@ class TabStripModel : public content::NotificationObserver {
int GetIndexOfController(
const content::NavigationController* controller) const;
- // Notify any observers that the TabContents at the specified index has
+ // Notify any observers that the TabContentsWrapper at the specified index has
// changed in some way. See TabChangeType for details of |change_type|.
void UpdateTabContentsStateAt(
int index,
@@ -294,42 +295,44 @@ class TabStripModel : public content::NotificationObserver {
// notifications this method causes.
void CloseAllTabs();
- // Returns true if there are any TabContents that are currently loading.
+ // Returns true if there are any TabContentsWrappers that are currently
+ // loading.
bool TabsAreLoading() const;
- // Returns the controller controller that opened the TabContents at |index|.
+ // Returns the controller controller that opened the TabContentsWrapper at
+ // |index|.
content::NavigationController* GetOpenerOfTabContentsAt(int index);
- // Changes the |opener| of the TabContents at |index|.
+ // Changes the |opener| of the TabContentsWrapper at |index|.
// Note: |opener| must be in this tab strip.
void SetOpenerOfTabContentsAt(
int index,
content::NavigationController* opener);
- // Returns the index of the next TabContents in the sequence of TabContentses
- // spawned by the specified NavigationController after |start_index|.
- // If |use_group| is true, the group property of the tab is used instead of
- // the opener to find the next tab. Under some circumstances the group
- // relationship may exist but the opener may not.
+ // Returns the index of the next TabContentsWrapper in the sequence of
+ // TabContentsWrappers spawned by the specified NavigationController after
+ // |start_index|. If |use_group| is true, the group property of the tab is
+ // used instead of the opener to find the next tab. Under some circumstances
+ // the group relationship may exist but the opener may not.
int GetIndexOfNextTabContentsOpenedBy(
const content::NavigationController* opener,
int start_index,
bool use_group) const;
- // Returns the index of the first TabContents in the model opened by the
- // specified opener.
+ // Returns the index of the first TabContentsWrapper in the model opened by
+ // the specified opener.
int GetIndexOfFirstTabContentsOpenedBy(
const content::NavigationController* opener,
int start_index) const;
- // Returns the index of the last TabContents in the model opened by the
+ // Returns the index of the last TabContentsWrapper in the model opened by the
// specified opener, starting at |start_index|.
int GetIndexOfLastTabContentsOpenedBy(
const content::NavigationController* opener,
int start_index) const;
// Called by the Browser when a navigation is about to occur in the specified
- // TabContents. Depending on the tab, and the transition type of the
+ // TabContentsWrapper. Depending on the tab, and the transition type of the
// navigation, the TabStripModel may adjust its selection and grouping
// behavior.
void TabNavigating(TabContentsWrapper* contents,
@@ -342,11 +345,11 @@ class TabStripModel : public content::NotificationObserver {
// TabStripModelOrderController.
void ForgetAllOpeners();
- // Forgets the group affiliation of the specified TabContents. This should be
- // called when a TabContents that is part of a logical group of tabs is
- // moved to a new logical context by the user (e.g. by typing a new URL or
- // selecting a bookmark). This also forgets the opener, which is considered
- // a weaker relationship than group.
+ // Forgets the group affiliation of the specified TabContentsWrapper. This
+ // should be called when a TabContentsWrapper that is part of a logical group
+ // of tabs is moved to a new logical context by the user (e.g. by typing a new
+ // URL or selecting a bookmark). This also forgets the opener, which is
+ // considered a weaker relationship than group.
void ForgetGroup(TabContentsWrapper* contents);
// Returns true if the group/opener relationships present for |contents|
@@ -375,8 +378,8 @@ class TabStripModel : public content::NotificationObserver {
// Returns true if the tab at |index| is blocked by a tab modal dialog.
bool IsTabBlocked(int index) const;
- // Returns true if the TabContents at |index| has been discarded to save
- // memory. See DiscardTabContentsAt() for details.
+ // Returns true if the TabContentsWrapper at |index| has been discarded to
+ // save memory. See DiscardTabContentsAt() for details.
bool IsTabDiscarded(int index) const;
// Returns the index of the first tab that is not a mini-tab. This returns
@@ -414,10 +417,10 @@ class TabStripModel : public content::NotificationObserver {
// Command level API /////////////////////////////////////////////////////////
- // Adds a TabContents at the best position in the TabStripModel given the
- // specified insertion index, transition, etc. |add_types| is a bitmask of
+ // Adds a TabContentsWrapper at the best position in the TabStripModel given
+ // the specified insertion index, transition, etc. |add_types| is a bitmask of
// AddTypes; see it for details. This method ends up calling into
- // InsertTabContentsAt to do the actual inertion.
+ // InsertTabContentsAt to do the actual insertion.
void AddTabContents(TabContentsWrapper* contents,
int index,
content::PageTransition transition,
@@ -512,21 +515,21 @@ class TabStripModel : public content::NotificationObserver {
// determine which indices the command applies to.
std::vector<int> GetIndicesForCommand(int index) const;
- // Returns true if the specified TabContents is a New Tab at the end of the
- // TabStrip. We check for this because opener relationships are _not_
+ // Returns true if the specified TabContentsWrapper is a New Tab at the end of
+ // the TabStrip. We check for this because opener relationships are _not_
// forgotten for the New Tab page opened as a result of a New Tab gesture
// (e.g. Ctrl+T, etc) since the user may open a tab transiently to look up
// something related to their current activity.
bool IsNewTabAtEndOfTabStrip(TabContentsWrapper* contents) const;
- // Closes the TabContents at the specified indices. This causes the
- // TabContents to be destroyed, but it may not happen immediately. If the
- // page in question has an unload event the TabContents will not be destroyed
- // until after the event has completed, which will then call back into this
- // method.
+ // Closes the TabContentsWrappers at the specified indices. This causes the
+ // TabContentsWrappers to be destroyed, but it may not happen immediately. If
+ // the page in question has an unload event the WebContents will not be
+ // destroyed until after the event has completed, which will then call back
+ // into this method.
//
- // Returns true if the TabContents were closed immediately, false if we are
- // waiting for the result of an onunload handler.
+ // Returns true if the TabContentsWrapper were closed immediately, false if we
+ // are waiting for the result of an onunload handler.
bool InternalCloseTabs(const std::vector<int>& in_indices,
uint32 close_types);
@@ -598,9 +601,9 @@ class TabStripModel : public content::NotificationObserver {
// Our delegate.
TabStripModelDelegate* delegate_;
- // A hunk of data representing a TabContents and (optionally) the
+ // A hunk of data representing a TabContentsWrapper and (optionally) the
// NavigationController that spawned it. This memory only sticks around while
- // the TabContents is in the current TabStripModel, unless otherwise
+ // the TabContentsWrapper is in the current TabStripModel, unless otherwise
// specified in code.
struct TabContentsData {
explicit TabContentsData(TabContentsWrapper* a_contents)
@@ -612,23 +615,24 @@ class TabStripModel : public content::NotificationObserver {
SetGroup(NULL);
}
- // Create a relationship between this TabContents and other TabContentses.
- // Used to identify which TabContents to select next after one is closed.
+ // Create a relationship between this TabContentsWrapper and other
+ // TabContentsWrappers. Used to identify which TabContentsWrapper to select
+ // next after one is closed.
void SetGroup(content::NavigationController* a_group) {
group = a_group;
opener = a_group;
}
- // Forget the opener relationship so that when this TabContents is closed
- // unpredictable re-selection does not occur.
+ // Forget the opener relationship so that when this TabContentsWrapper is
+ // closed unpredictable re-selection does not occur.
void ForgetOpener() {
opener = NULL;
}
TabContentsWrapper* contents;
// We use NavigationControllers here since they more closely model the
- // "identity" of a Tab, TabContents can change depending on the URL loaded
- // in the Tab.
+ // "identity" of a Tab, TabContentsWrappers can change depending on the URL
+ // loaded in the Tab.
// The group is used to model a set of tabs spawned from a single parent
// tab. This value is preserved for a given tab as long as the tab remains
// navigated to the link it was initially opened at or some navigation from
@@ -660,7 +664,7 @@ class TabStripModel : public content::NotificationObserver {
bool discarded;
};
- // The TabContents data currently hosted within this TabStripModel.
+ // The TabContentsWrapper data currently hosted within this TabStripModel.
typedef std::vector<TabContentsData*> TabContentsDataVector;
TabContentsDataVector contents_data_;
diff --git a/chrome/browser/tabs/tab_strip_model_delegate.h b/chrome/browser/tabs/tab_strip_model_delegate.h
index 6415440..de43b34 100644
--- a/chrome/browser/tabs/tab_strip_model_delegate.h
+++ b/chrome/browser/tabs/tab_strip_model_delegate.h
@@ -29,7 +29,7 @@ class Rect;
//
// A delegate interface that the TabStripModel uses to perform work that it
// can't do itself, such as obtain a container HWND for creating new
-// TabContents, creating new TabStripModels for detached tabs, etc.
+// TabContentsWrappers, creating new TabStripModels for detached tabs, etc.
//
// This interface is typically implemented by the controller that instantiates
// the TabStripModel (in our case the Browser object).
@@ -60,9 +60,9 @@ class TabStripModelDelegate {
// Determines what drag actions are possible for the specified strip.
virtual int GetDragActions() const = 0;
- // Creates an appropriate TabContents for the given URL. This is handled by
- // the delegate since the TabContents may require special circumstances to
- // exist for it to be constructed (e.g. a parent HWND).
+ // Creates an appropriate TabContentsWrapper for the given URL. This is
+ // handled by the delegate since the TabContentsWrapper may require special
+ // circumstances to exist for it to be constructed (e.g. a parent HWND).
// If |defer_load| is true, the navigation controller doesn't load the url.
// If |instance| is not null, its process is used to render the tab.
virtual TabContentsWrapper* CreateTabContentsForURL(
@@ -85,14 +85,14 @@ class TabStripModelDelegate {
virtual void CloseFrameAfterDragSession() = 0;
// Creates an entry in the historical tab database for the specified
- // TabContents.
+ // TabContentsWrapper.
virtual void CreateHistoricalTab(TabContentsWrapper* contents) = 0;
- // Runs any unload listeners associated with the specified TabContents before
- // it is closed. If there are unload listeners that need to be run, this
- // function returns true and the TabStripModel will wait before closing the
- // TabContents. If it returns false, there are no unload listeners and the
- // TabStripModel can close the TabContents immediately.
+ // Runs any unload listeners associated with the specified TabContentsWrapper
+ // before it is closed. If there are unload listeners that need to be run,
+ // this function returns true and the TabStripModel will wait before closing
+ // the TabContentsWrapper. If it returns false, there are no unload listeners
+ // and the TabStripModel can close the TabContentsWrapper immediately.
virtual bool RunUnloadListenerBeforeClosing(TabContentsWrapper* contents) = 0;
// Returns true if a tab can be restored.
diff --git a/chrome/browser/tabs/tab_strip_model_observer.h b/chrome/browser/tabs/tab_strip_model_observer.h
index 5b5e8ea..ce1b486 100644
--- a/chrome/browser/tabs/tab_strip_model_observer.h
+++ b/chrome/browser/tabs/tab_strip_model_observer.h
@@ -39,25 +39,26 @@ class TabStripModelObserver {
ALL
};
- // A new TabContents was inserted into the TabStripModel at the specified
- // index. |foreground| is whether or not it was opened in the foreground
- // (selected).
+ // A new TabContentsWrapper was inserted into the TabStripModel at the
+ // specified index. |foreground| is whether or not it was opened in the
+ // foreground (selected).
virtual void TabInsertedAt(TabContentsWrapper* contents,
int index,
bool foreground);
- // The specified TabContents at |index| is being closed (and eventually
+ // The specified TabContentsWrapper at |index| is being closed (and eventually
// destroyed). |tab_strip_model| is the TabStripModel the tab was part of.
virtual void TabClosingAt(TabStripModel* tab_strip_model,
TabContentsWrapper* contents,
int index);
- // The specified TabContents at |index| is being detached, perhaps to be
- // inserted in another TabStripModel. The implementer should take whatever
- // action is necessary to deal with the TabContents no longer being present.
+ // The specified TabContentsWrapper at |index| is being detached, perhaps to
+ // be inserted in another TabStripModel. The implementer should take whatever
+ // action is necessary to deal with the TabContentsWrapper no longer being
+ // present.
virtual void TabDetachedAt(TabContentsWrapper* contents, int index);
- // The active TabContents is about to change from |old_contents|.
+ // The active TabContentsWrapper is about to change from |old_contents|.
// This gives observers a chance to prepare for an impending switch before it
// happens.
virtual void TabDeactivated(TabContentsWrapper* contents);
@@ -84,14 +85,14 @@ class TabStripModelObserver {
virtual void TabSelectionChanged(TabStripModel* tab_strip_model,
const TabStripSelectionModel& old_model);
- // The specified TabContents at |from_index| was moved to |to_index|.
+ // The specified TabContentsWrapper at |from_index| was moved to |to_index|.
virtual void TabMoved(TabContentsWrapper* contents,
int from_index,
int to_index);
- // The specified TabContents at |index| changed in some way. |contents| may
- // be an entirely different object and the old value is no longer available
- // by the time this message is delivered.
+ // The specified TabContentsWrapper at |index| changed in some way. |contents|
+ // may be an entirely different object and the old value is no longer
+ // available by the time this message is delivered.
//
// See TabChangeType for a description of |change_type|.
virtual void TabChangedAt(TabContentsWrapper* contents,
@@ -100,7 +101,7 @@ class TabStripModelObserver {
// The tab contents was replaced at the specified index. This is invoked
// when instant is enabled and the user navigates by way of instant or when
- // prerendering swaps in a prerendered TabContents.
+ // prerendering swaps in a prerendered TabContentsWrapper.
virtual void TabReplacedAt(TabStripModel* tab_strip_model,
TabContentsWrapper* old_contents,
TabContentsWrapper* new_contents,
diff --git a/chrome/browser/tabs/tab_strip_model_unittest.cc b/chrome/browser/tabs/tab_strip_model_unittest.cc
index 6cb4bbe..178fe53 100644
--- a/chrome/browser/tabs/tab_strip_model_unittest.cc
+++ b/chrome/browser/tabs/tab_strip_model_unittest.cc
@@ -50,7 +50,8 @@ using testing::_;
namespace {
-// Class used to delete a TabContents when another TabContents is destroyed.
+// Class used to delete a TabContentsWrapper when another TabContentsWrapper is
+// destroyed.
class DeleteTabContentsOnDestroyedObserver
: public content::NotificationObserver {
public:
@@ -115,8 +116,8 @@ class TabStripDummyDelegate : public TestTabStripModelDelegate {
}
private:
- // A dummy TabContents we give to callers that expect us to actually build a
- // Destinations tab for them.
+ // A dummy TabContentsWrapper we give to callers that expect us to actually
+ // build a Destinations tab for them.
TabContentsWrapper* dummy_contents_;
// Whether tabs can be closed.
@@ -148,7 +149,7 @@ class TabStripModelTest : public ChromeRenderViewHostTestHarness {
return retval;
}
- // Forwards a URL "load" request through to our dummy TabContents
+ // Forwards a URL "load" request through to our dummy TabContentsWrapper
// implementation.
void LoadURL(WebContents* con, const std::wstring& url) {
controller().LoadURL(GURL(WideToUTF16(url)), content::Referrer(),
@@ -1279,11 +1280,11 @@ TEST_F(TabStripModelTest, AddTabContents_MiddleClickLinksAndClose) {
EXPECT_EQ(typed_page_contents, tabstrip.GetTabContentsAt(4));
// Now simulate seleting a tab in the middle of the group of tabs opened from
- // the home page and start closing them. Each TabContents in the group should
- // be closed, right to left. This test is constructed to start at the middle
- // TabContents in the group to make sure the cursor wraps around to the first
- // TabContents in the group before closing the opener or any other
- // TabContents.
+ // the home page and start closing them. Each TabContentsWrapper in the group
+ // should be closed, right to left. This test is constructed to start at the
+ // middle TabContentsWrapper in the group to make sure the cursor wraps around
+ // to the first TabContentsWrapper in the group before closing the opener or
+ // any other TabContentsWrapper.
tabstrip.ActivateTabAt(2, true);
tabstrip.CloseSelectedTabs();
EXPECT_EQ(middle_click_contents3, tabstrip.GetActiveTabContents());
@@ -1300,8 +1301,9 @@ TEST_F(TabStripModelTest, AddTabContents_MiddleClickLinksAndClose) {
EXPECT_TRUE(tabstrip.empty());
}
-// Tests whether or not a TabContents created by a left click on a link that
-// opens a new tab is inserted correctly adjacent to the tab that spawned it.
+// Tests whether or not a TabContentsWrapper created by a left click on a link
+// that opens a new tab is inserted correctly adjacent to the tab that spawned
+// it.
TEST_F(TabStripModelTest, AddTabContents_LeftClickPopup) {
TabStripDummyDelegate delegate(NULL);
TabStripModel tabstrip(&delegate, profile());
diff --git a/chrome/browser/task_manager/task_manager.cc b/chrome/browser/task_manager/task_manager.cc
index 3002b6d..0457b63 100644
--- a/chrome/browser/task_manager/task_manager.cc
+++ b/chrome/browser/task_manager/task_manager.cc
@@ -1100,7 +1100,7 @@ void TaskManager::OpenAboutMemory() {
// In case the browser window is minimized, show it. If |browser| is a
// non-tabbed window, the call to OpenURL above will have opened a
- // TabContents in a tabbed browser, so we need to grab it with
+ // TabContentsWrapper in a tabbed browser, so we need to grab it with
// GetLastActive before the call to show().
if (!browser->is_type_tabbed()) {
browser = BrowserList::GetLastActive();
diff --git a/chrome/browser/task_manager/task_manager.h b/chrome/browser/task_manager/task_manager.h
index c37afdc..fe88a09 100644
--- a/chrome/browser/task_manager/task_manager.h
+++ b/chrome/browser/task_manager/task_manager.h
@@ -35,7 +35,7 @@ class URLRequest;
#define TASKMANAGER_RESOURCE_TYPE_LIST(def) \
def(BROWSER) /* The main browser process. */ \
- def(RENDERER) /* A normal TabContents renderer process. */ \
+ def(RENDERER) /* A normal WebContents renderer process. */ \
def(EXTENSION) /* An extension or app process. */ \
def(NOTIFICATION) /* A notification process. */ \
def(PLUGIN) /* A plugin process. */ \
@@ -385,7 +385,7 @@ class TaskManagerModel : public base::RefCountedThreadSafe<TaskManagerModel> {
// Returns the type of the given resource.
TaskManager::Resource::Type GetResourceType(int index) const;
- // Returns TabContents of given resource or NULL if not applicable.
+ // Returns TabContentsWrapper of given resource or NULL if not applicable.
TabContentsWrapper* GetResourceTabContents(int index) const;
// Returns Extension of given resource or NULL if not applicable.
diff --git a/chrome/browser/task_manager/task_manager_resource_providers.cc b/chrome/browser/task_manager/task_manager_resource_providers.cc
index 2ca8157..7e65722 100644
--- a/chrome/browser/task_manager/task_manager_resource_providers.cc
+++ b/chrome/browser/task_manager/task_manager_resource_providers.cc
@@ -383,7 +383,7 @@ void TaskManagerTabContentsResourceProvider::StartUpdating() {
DCHECK(!updating_);
updating_ = true;
- // Add all the existing TabContents.
+ // Add all the existing TabContentsWrappers.
for (TabContentsIterator iterator; !iterator.done(); ++iterator)
Add(*iterator);
@@ -396,7 +396,7 @@ void TaskManagerTabContentsResourceProvider::StartUpdating() {
content::NotificationService::AllBrowserContextsAndSources());
// TAB_CONTENTS_DISCONNECTED should be enough to know when to remove a
// resource. This is an attempt at mitigating a crasher that seem to
- // indicate a resource is still referencing a deleted TabContents
+ // indicate a resource is still referencing a deleted WebContents
// (http://crbug.com/7321).
registrar_.Add(this, content::NOTIFICATION_WEB_CONTENTS_DESTROYED,
content::NotificationService::AllBrowserContextsAndSources());
@@ -453,7 +453,7 @@ void TaskManagerTabContentsResourceProvider::Add(
std::map<TabContentsWrapper*, TaskManagerTabContentsResource*>::const_iterator
iter = resources_.find(tab_contents);
if (iter != resources_.end()) {
- // The case may happen that we have added a TabContents as part of the
+ // The case may happen that we have added a WebContents as part of the
// iteration performed during StartUpdating() call but the notification that
// it has connected was not fired yet. So when the notification happens, we
// already know about this tab and just ignore it.
@@ -469,7 +469,7 @@ void TaskManagerTabContentsResourceProvider::Remove(
std::map<TabContentsWrapper*, TaskManagerTabContentsResource*>::iterator
iter = resources_.find(tab_contents);
if (iter == resources_.end()) {
- // Since TabContents are destroyed asynchronously (see TabContentsCollector
+ // Since WebContents are destroyed asynchronously (see TabContentsCollector
// in navigation_controller.cc), we can be notified of a tab being removed
// that we don't know. This can happen if the user closes a tab and quickly
// opens the task manager, before the tab is actually destroyed.
diff --git a/chrome/browser/translate/translate_manager.cc b/chrome/browser/translate/translate_manager.cc
index f5076f0..eea35c5 100644
--- a/chrome/browser/translate/translate_manager.cc
+++ b/chrome/browser/translate/translate_manager.cc
@@ -338,7 +338,7 @@ void TranslateManager::Observe(int type,
// When doing a page reload, we don't get a TAB_LANGUAGE_DETERMINED
// notification. So we need to explictly initiate the translation.
// Note that we delay it as the TranslateManager gets this notification
- // before the TabContents and the TabContents processing might remove the
+ // before the WebContents and the WebContents processing might remove the
// current infobars. Since InitTranslation might add an infobar, it must
// be done after that.
MessageLoop::current()->PostTask(FROM_HERE,
diff --git a/chrome/browser/translate/translate_manager_browsertest.cc b/chrome/browser/translate/translate_manager_browsertest.cc
index 42586d8..9e07da3 100644
--- a/chrome/browser/translate/translate_manager_browsertest.cc
+++ b/chrome/browser/translate/translate_manager_browsertest.cc
@@ -170,10 +170,10 @@ class TranslateManagerTest : public TabContentsWrapperTestHarness,
WebKit::initialize(&webkit_platform_support_);
// Access the TranslateManager singleton so it is created before we call
// TabContentsWrapperTestHarness::SetUp() to match what's done in Chrome,
- // where the TranslateManager is created before the TabContents. This
+ // where the TranslateManager is created before the WebContents. This
// matters as they both register for similar events and we want the
// notifications to happen in the same sequence (TranslateManager first,
- // TabContents second). Also clears the translate script so it is fetched
+ // WebContents second). Also clears the translate script so it is fetched
// everytime and sets the expiration delay to a large value by default (in
// case it was zeroed in a previous test).
TranslateManager::GetInstance()->ClearTranslateScript();
diff --git a/chrome/browser/ui/app_modal_dialogs/app_modal_dialog_queue.cc b/chrome/browser/ui/app_modal_dialogs/app_modal_dialog_queue.cc
index 1d09850..25086c6 100644
--- a/chrome/browser/ui/app_modal_dialogs/app_modal_dialog_queue.cc
+++ b/chrome/browser/ui/app_modal_dialogs/app_modal_dialog_queue.cc
@@ -25,7 +25,7 @@ void AppModalDialogQueue::ShowNextDialog() {
void AppModalDialogQueue::ActivateModalDialog() {
if (showing_modal_dialog_) {
// As part of showing a modal dialog we may end up back in this method
- // (showing a dialog activates the TabContents, which can trigger a call
+ // (showing a dialog activates the WebContents, which can trigger a call
// to ActivateModalDialog). We ignore such a request as after the call to
// activate the tab contents the dialog is shown.
return;
diff --git a/chrome/browser/ui/auto_login_prompter.cc b/chrome/browser/ui/auto_login_prompter.cc
index 3f49339..aff101a 100644
--- a/chrome/browser/ui/auto_login_prompter.cc
+++ b/chrome/browser/ui/auto_login_prompter.cc
@@ -155,7 +155,7 @@ void AutoLoginPrompter::Observe(int type,
if (type == content::NOTIFICATION_LOAD_STOP) {
TabContentsWrapper* wrapper =
TabContentsWrapper::GetCurrentWrapperForContents(web_contents_);
- // |wrapper| is NULL for TabContents hosted in HTMLDialog.
+ // |wrapper| is NULL for WebContents hosted in HTMLDialog.
if (wrapper) {
InfoBarTabHelper* infobar_helper = wrapper->infobar_tab_helper();
infobar_helper->AddInfoBar(new AutoLoginInfoBarDelegate(infobar_helper,
diff --git a/chrome/browser/ui/blocked_content/blocked_content_container.cc b/chrome/browser/ui/blocked_content/blocked_content_container.cc
index 2529c7c..505dfa6 100644
--- a/chrome/browser/ui/blocked_content/blocked_content_container.cc
+++ b/chrome/browser/ui/blocked_content/blocked_content_container.cc
@@ -74,7 +74,7 @@ void BlockedContentContainer::LaunchForContents(
tab_contents->web_contents()->SetDelegate(NULL);
tab_contents->blocked_content_tab_helper()->set_delegate(NULL);
// We needn't call WasRestored to change its status because the
- // TabContents::AddNewContents will do it.
+ // WebContents::AddNewContents will do it.
owner_->web_contents()->AddNewContents(
tab_contents->web_contents(),
content.disposition,
diff --git a/chrome/browser/ui/blocked_content/blocked_content_container.h b/chrome/browser/ui/blocked_content/blocked_content_container.h
index 3e20d6e..c0b1d53 100644
--- a/chrome/browser/ui/blocked_content/blocked_content_container.h
+++ b/chrome/browser/ui/blocked_content/blocked_content_container.h
@@ -4,7 +4,7 @@
// Defines the public interface for the blocked content (including popup)
// notifications. This interface should only be used by the
-// BlockedContentTabHelper. Users and subclasses of TabContents/
+// BlockedContentTabHelper. Users and subclasses of WebContents/
// TabContentsWrapper should use the appropriate methods on
// BlockedContentTabHelper to access information about blocked content.
@@ -20,22 +20,22 @@
class TabContentsWrapper;
-// Takes ownership of TabContents that are unrequested popup windows.
+// Takes ownership of TabContentsWrappers that are unrequested popup windows.
class BlockedContentContainer : public BlockedContentTabHelperDelegate,
public content::WebContentsDelegate {
public:
- // Creates a container for a certain TabContents:
+ // Creates a container for a certain TabContentsWrapper:
explicit BlockedContentContainer(TabContentsWrapper* owner);
virtual ~BlockedContentContainer();
- // Adds a TabContents to this container. |bounds| are the window bounds
- // requested for the TabContents.
+ // Adds a TabContentsWrapper to this container. |bounds| are the window bounds
+ // requested for the TabContentsWrapper.
void AddTabContents(TabContentsWrapper* tab_contents,
WindowOpenDisposition disposition,
const gfx::Rect& bounds,
bool user_gesture);
- // Shows the blocked TabContents |tab_contents|.
+ // Shows the blocked TabContentsWrapper |tab_contents|.
void LaunchForContents(TabContentsWrapper* tab_contents);
// Returns the number of blocked contents.
@@ -90,7 +90,8 @@ class BlockedContentContainer : public BlockedContentTabHelperDelegate,
typedef std::vector<BlockedContent> BlockedContents;
- // The TabContents that owns and constrains this BlockedContentContainer.
+ // The TabContentsWrapper that owns and constrains this
+ // BlockedContentContainer.
TabContentsWrapper* owner_;
// Information about all blocked contents.
diff --git a/chrome/browser/ui/blocked_content/blocked_content_tab_helper.h b/chrome/browser/ui/blocked_content/blocked_content_tab_helper.h
index 97691af76..21afc11 100644
--- a/chrome/browser/ui/blocked_content/blocked_content_tab_helper.h
+++ b/chrome/browser/ui/blocked_content/blocked_content_tab_helper.h
@@ -25,10 +25,10 @@ class BlockedContentTabHelper : public content::WebContentsObserver {
BlockedContentTabHelperDelegate* delegate() const { return delegate_; }
void set_delegate(BlockedContentTabHelperDelegate* d) { delegate_ = d; }
- // Sets whether all TabContents added by way of |AddNewContents| should be
- // blocked. Transitioning from all blocked to not all blocked results in
- // reevaluating any blocked TabContents, which may result in unblocking some
- // of the blocked TabContents.
+ // Sets whether all TabContentsWrapper added by way of |AddNewContents| should
+ // be blocked. Transitioning from all blocked to not all blocked results in
+ // reevaluating any blocked TabContentsWrappers, which may result in
+ // unblocking some of the blocked TabContentsWrappers.
void SetAllContentsBlocked(bool value);
bool all_contents_blocked() const { return all_contents_blocked_; }
@@ -44,7 +44,7 @@ class BlockedContentTabHelper : public content::WebContentsObserver {
const gfx::Rect& initial_pos,
bool user_gesture);
- // Shows the blocked TabContents |tab_contents|.
+ // Shows the blocked TabContentsWrapper |tab_contents|.
void LaunchForContents(TabContentsWrapper* tab_contents);
// Returns the number of blocked contents.
@@ -68,10 +68,11 @@ class BlockedContentTabHelper : public content::WebContentsObserver {
// the blocked state.
void SendNotification(TabContentsWrapper* contents, bool blocked_state);
- // Object that holds any blocked TabContents spawned from this TabContents.
+ // Object that holds any blocked TabContentsWrapper spawned from this
+ // TabContentsWrapper.
scoped_ptr<BlockedContentContainer> blocked_contents_;
- // Should we block all child TabContents this attempts to spawn.
+ // Should we block all child TabContentsWrapper this attempts to spawn.
bool all_contents_blocked_;
// Owning TabContentsWrapper.
diff --git a/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc b/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc
index 78b796a..d60a403 100644
--- a/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc
+++ b/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc
@@ -48,7 +48,7 @@ bool BookmarkTabHelper::ShouldShowBookmarkBar() {
if (web_contents()->ShowingInterstitialPage())
return false;
- // See TabContents::GetWebUIForCurrentState() comment for more info. This case
+ // See WebContents::GetWebUIForCurrentState() comment for more info. This case
// is very similar, but for non-first loads, we want to use the committed
// entry. This is so the bookmarks bar disappears at the same time the page
// does.
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 7061266..39d1c51 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -851,7 +851,7 @@ WebContents* Browser::OpenAppShortcutWindow(Profile* profile,
if (update_shortcut) {
// Set UPDATE_SHORTCUT as the pending web app action. This action is picked
// up in LoadingStateChanged to schedule a GetApplicationInfo. And when
- // the web app info is available, TabContents notifies Browser via
+ // the web app info is available, ExtensionTabHelper notifies Browser via
// OnDidGetApplicationInfo, which calls
// web_app::UpdateShortcutForTabContents when it sees UPDATE_SHORTCUT as
// pending web app action.
@@ -2778,8 +2778,8 @@ void Browser::RegisterUserPrefs(PrefService* prefs) {
// static
bool Browser::RunUnloadEventsHelper(WebContents* contents) {
- // If the TabContents is not connected yet, then there's no unload
- // handler we can fire even if the TabContents has an unload listener.
+ // If the WebContents is not connected yet, then there's no unload
+ // handler we can fire even if the WebContents has an unload listener.
// One case where we hit this is in a tab that has an infinite loop
// before load.
if (contents->NeedToFireBeforeUnload()) {
@@ -3279,8 +3279,8 @@ TabContentsWrapper* Browser::AddBlankTab(bool foreground) {
TabContentsWrapper* Browser::AddBlankTabAt(int index, bool foreground) {
// Time new tab page creation time. We keep track of the timing data in
- // TabContents, but we want to include the time it takes to create the
- // TabContents object too.
+ // WebContents, but we want to include the time it takes to create the
+ // WebContents object too.
base::TimeTicks new_tab_start_time = base::TimeTicks::Now();
browser::NavigateParams params(this, GURL(chrome::kChromeUINewTabURL),
content::PAGE_TRANSITION_TYPED);
@@ -3381,7 +3381,7 @@ void Browser::DuplicateContentsAt(int index) {
window()->GetRestoredBounds().size()));
// We need to show the browser now. Otherwise ContainerWin assumes the
- // TabContents is invisible and won't size it.
+ // WebContents is invisible and won't size it.
browser->window()->Show();
// The page transition below is only for the purpose of inserting the tab.
@@ -3514,7 +3514,7 @@ void Browser::TabClosingAt(TabStripModel* tab_strip_model,
&contents->web_contents()->GetController()),
content::NotificationService::NoDetails());
- // Sever the TabContents' connection back to us.
+ // Sever the WebContents' connection back to us.
SetAsDelegate(contents, NULL);
}
@@ -4114,9 +4114,9 @@ void Browser::WebContentsCreated(WebContents* source_contents,
WebContents* new_contents) {
// Create a TabContentsWrapper now, so all observers are in place, as the
// network requests for its initial navigation will start immediately. The
- // TabContents will later be inserted into this browser using
+ // WebContents will later be inserted into this browser using
// Browser::Navigate via AddNewContents. The latter will retrieve the newly
- // created TabContentsWrapper from TabContents object.
+ // created TabContentsWrapper from WebContents object.
new TabContentsWrapper(new_contents);
// Notify.
@@ -5386,7 +5386,7 @@ Browser* Browser::GetOrCreateTabbedBrowser(Profile* profile) {
}
void Browser::SetAsDelegate(TabContentsWrapper* tab, Browser* delegate) {
- // TabContents...
+ // WebContents...
tab->web_contents()->SetDelegate(delegate);
// ...and all the helpers.
@@ -5484,8 +5484,8 @@ void Browser::TabRestoreServiceDestroyed(TabRestoreService* service) {
tab_restore_service_ = NULL;
}
-// Centralized method for creating a TabContents, configuring and installing
-// all its supporting objects and observers.
+// Centralized method for creating a TabContentsWrapper, configuring and
+// installing all its supporting objects and observers.
TabContentsWrapper* Browser::TabContentsFactory(
Profile* profile,
SiteInstance* site_instance,
@@ -5606,7 +5606,7 @@ void Browser::ViewSource(TabContentsWrapper* contents,
window()->GetRestoredBounds().size()));
// We need to show the browser now. Otherwise ContainerWin assumes the
- // TabContents is invisible and won't size it.
+ // WebContents is invisible and won't size it.
browser->window()->Show();
// The page transition below is only for the purpose of inserting the tab.
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
index e6e3911..dfca32f 100644
--- a/chrome/browser/ui/browser.h
+++ b/chrome/browser/ui/browser.h
@@ -448,12 +448,12 @@ class Browser : public TabHandlerDelegate,
int GetIndexForInsertionDuringRestore(int relative_index);
// Adds a selected tab with the specified URL and transition, returns the
- // created TabContents.
+ // created TabContentsWrapper.
TabContentsWrapper* AddSelectedTabWithURL(
const GURL& url,
content::PageTransition transition);
- // Add a new tab, given a TabContents. A TabContents appropriate to
+ // Add a new tab, given a TabContentsWrapper. A WebContents appropriate to
// display the last committed entry is created and returned.
content::WebContents* AddTab(TabContentsWrapper* tab_contents,
content::PageTransition type);
@@ -817,8 +817,8 @@ class Browser : public TabHandlerDelegate,
virtual void TabRestoreServiceChanged(TabRestoreService* service) OVERRIDE;
virtual void TabRestoreServiceDestroyed(TabRestoreService* service) OVERRIDE;
- // Centralized method for creating a TabContents, configuring and installing
- // all its supporting objects and observers.
+ // Centralized method for creating a TabContentsWrapper, configuring and
+ // installing all its supporting objects and observers.
static TabContentsWrapper* TabContentsFactory(
Profile* profile,
content::SiteInstance* site_instance,
@@ -839,8 +839,8 @@ class Browser : public TabHandlerDelegate,
const DockInfo& dock_info,
bool maximize);
virtual int GetDragActions() const;
- // Construct a TabContents for a given URL, profile and transition type.
- // If instance is not null, its process will be used to render the tab.
+ // Construct a TabContentsWrapper for a given URL, profile and transition
+ // type. If instance is not null, its process will be used to render the tab.
virtual TabContentsWrapper* CreateTabContentsForURL(
const GURL& url,
const content::Referrer& referrer,
@@ -1189,7 +1189,7 @@ class Browser : public TabHandlerDelegate,
void UpdateOpenFileState();
// Ask the Reload/Stop button to change its icon, and update the Stop command
- // state. |is_loading| is true if the current TabContents is loading.
+ // state. |is_loading| is true if the current WebContents is loading.
// |force| is true if the button should change its icon immediately.
void UpdateReloadStopState(bool is_loading, bool force);
@@ -1400,7 +1400,7 @@ class Browser : public TabHandlerDelegate,
typedef std::map<const content::WebContents*, int> UpdateMap;
- // Maps from TabContents to pending UI updates that need to be processed.
+ // Maps from WebContents to pending UI updates that need to be processed.
// We don't update things like the URL or tab title right away to avoid
// flickering and extra painting.
// See ScheduleUIUpdate and ProcessPendingUIUpdates.
@@ -1481,7 +1481,7 @@ class Browser : public TabHandlerDelegate,
};
// Which deferred action to perform when OnDidGetApplicationInfo is notified
- // from a TabContents. Currently, only one pending action is allowed.
+ // from a WebContents. Currently, only one pending action is allowed.
WebAppAction pending_web_app_action_;
// The profile's tab restore service. The service is owned by the profile,
diff --git a/chrome/browser/ui/browser_list.cc b/chrome/browser/ui/browser_list.cc
index abdb135..9aabeab 100644
--- a/chrome/browser/ui/browser_list.cc
+++ b/chrome/browser/ui/browser_list.cc
@@ -85,7 +85,7 @@ class BrowserActivityObserver : public content::NotificationObserver {
}
// Counts the number of tabs in each browser window and logs them. This is
- // different than the number of TabContents objects since TabContents objects
+ // different than the number of WebContents objects since WebContents objects
// can be used for popups and in dialog boxes. We're just counting toplevel
// tabs here.
void LogBrowserTabCount() const {
@@ -855,12 +855,12 @@ TabContentsIterator::TabContentsIterator()
}
void TabContentsIterator::Advance() {
- // The current TabContents should be valid unless we are at the beginning.
+ // The current WebContents should be valid unless we are at the beginning.
DCHECK(cur_ || (web_view_index_ == -1 &&
browser_iterator_ == BrowserList::begin()))
<< "Trying to advance past the end";
- // Update cur_ to the next TabContents in the list.
+ // Update cur_ to the next WebContents in the list.
while (browser_iterator_ != BrowserList::end()) {
if (++web_view_index_ >= (*browser_iterator_)->tab_count()) {
// Advance to the next Browser in the list.
@@ -876,13 +876,13 @@ void TabContentsIterator::Advance() {
return;
}
}
- // If no more TabContents from Browsers, check the BackgroundPrintingManager.
+ // If no more WebContents from Browsers, check the BackgroundPrintingManager.
while (bg_printing_iterator_ != GetBackgroundPrintingManager()->end()) {
cur_ = *bg_printing_iterator_;
CHECK(cur_);
++bg_printing_iterator_;
return;
}
- // Reached the end - no more TabContents.
+ // Reached the end - no more WebContents.
cur_ = NULL;
}
diff --git a/chrome/browser/ui/browser_list.h b/chrome/browser/ui/browser_list.h
index 1a568ba..1e3609d 100644
--- a/chrome/browser/ui/browser_list.h
+++ b/chrome/browser/ui/browser_list.h
@@ -229,7 +229,7 @@ class TabContentsWrapper;
//
// Example:
// for (TabContentsIterator iterator; !iterator.done(); ++iterator) {
-// TabContents* cur = *iterator;
+// TabContentsWrapper* cur = *iterator;
// -or-
// iterator->operationOnTabContents();
// ...
@@ -243,15 +243,15 @@ class TabContentsIterator {
return cur_ == NULL;
}
- // Returns the Browser instance associated with the current TabContents.
- // Valid as long as !done()
+ // Returns the Browser instance associated with the current
+ // TabContentsWrapper. Valid as long as !done()
Browser* browser() const {
if (browser_iterator_ != BrowserList::end())
return *browser_iterator_;
return NULL;
}
- // Returns the current TabContents, valid as long as !Done()
+ // Returns the current TabContentsWrapper, valid as long as !Done()
TabContentsWrapper* operator->() const {
return cur_;
}
@@ -285,9 +285,9 @@ class TabContentsIterator {
// iterator over the TabContentsWrappers doing background printing.
std::set<TabContentsWrapper*>::const_iterator bg_printing_iterator_;
- // Current TabContents, or NULL if we're at the end of the list. This can
- // be extracted given the browser iterator and index, but it's nice to cache
- // this since the caller may access the current host many times.
+ // Current TabContentsWrapper, or NULL if we're at the end of the list. This
+ // can be extracted given the browser iterator and index, but it's nice to
+ // cache this since the caller may access the current host many times.
TabContentsWrapper* cur_;
};
diff --git a/chrome/browser/ui/browser_navigator.cc b/chrome/browser/ui/browser_navigator.cc
index 3154eec..be1adbb 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()) {
diff --git a/chrome/browser/ui/browser_navigator.h b/chrome/browser/ui/browser_navigator.h
index 1a82cfe..97eb93f 100644
--- a/chrome/browser/ui/browser_navigator.h
+++ b/chrome/browser/ui/browser_navigator.h
@@ -35,7 +35,7 @@ namespace browser {
// params.disposition = NEW_BACKGROUND_TAB;
// browser::Navigate(&params);
//
-// Opens a popup TabContents:
+// Opens a popup TabContentsWrapper:
// browser::NavigateParams params(browser, popup_contents);
// params.source_contents = source_contents;
// browser::Navigate(&params);
@@ -53,27 +53,27 @@ struct NavigateParams {
GURL url;
content::Referrer referrer;
- // [in] A TabContents to be navigated or inserted into the target Browser's
- // tabstrip. If NULL, |url| or the homepage will be used instead. When
- // non-NULL, Navigate() assumes it has already been navigated to its
- // intended destination and will not load any URL in it (i.e. |url| is
- // ignored).
+ // [in] A TabContentsWrapper to be navigated or inserted into the target
+ // Browser's tabstrip. If NULL, |url| or the homepage will be used
+ // instead. When non-NULL, Navigate() assumes it has already been
+ // navigated to its intended destination and will not load any URL in it
+ // (i.e. |url| is ignored).
// Default is NULL.
- // [out] The TabContents in which the navigation occurred or that was
+ // [out] The TabContentsWrapper in which the navigation occurred or that was
// inserted. Guaranteed non-NULL except for note below:
// Note: If this field is set to NULL by the caller and Navigate() creates
- // a new TabContents, this field will remain NULL and the TabContents
- // deleted if the TabContents it created is not added to a TabStripModel
- // before Navigate() returns.
+ // a new TabContentsWrapper, this field will remain NULL and the
+ // TabContentsWrapper deleted if the TabContentsWrapper it created is
+ // not added to a TabStripModel before Navigate() returns.
TabContentsWrapper* target_contents;
- // [in] The TabContents that initiated the Navigate() request if such context
- // is necessary. Default is NULL, i.e. no context.
- // [out] If NULL, this value will be set to the selected TabContents in the
- // originating browser prior to the operation performed by Navigate().
- // However, if the originating page is from a different profile (e.g. an
- // OFF_THE_RECORD page originating from a non-OTR window), then
- // |source_contents| is reset to NULL.
+ // [in] The TabContentsWrapper that initiated the Navigate() request if such
+ // context is necessary. Default is NULL, i.e. no context.
+ // [out] If NULL, this value will be set to the selected TabContentsWrapper in
+ // the originating browser prior to the operation performed by
+ // Navigate(). However, if the originating page is from a different
+ // profile (e.g. an OFF_THE_RECORD page originating from a non-OTR
+ // window), then |source_contents| is reset to NULL.
TabContentsWrapper* source_contents;
// The disposition requested by the navigation source. Default is
diff --git a/chrome/browser/ui/browser_navigator_browsertest.cc b/chrome/browser/ui/browser_navigator_browsertest.cc
index 8cb0709..cd98133 100644
--- a/chrome/browser/ui/browser_navigator_browsertest.cc
+++ b/chrome/browser/ui/browser_navigator_browsertest.cc
@@ -180,7 +180,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, Disposition_SingletonTabExisting) {
// Register for a notification if an additional tab_contents was instantiated.
// Opening a Singleton tab that is already opened should not be opening a new
- // tab nor be creating a new TabContents object
+ // tab nor be creating a new TabContentsWrapper object.
content::NotificationRegistrar registrar;
// As the registrar object goes out of scope, this will get unregistered
@@ -613,7 +613,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, Disposition_IgnoreAction) {
RunSuppressTest(IGNORE_ACTION);
}
-// This tests adding a foreground tab with a predefined TabContents.
+// This tests adding a foreground tab with a predefined TabContentsWrapper.
IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, TargetContents_ForegroundTab) {
browser::NavigateParams p(MakeNavigateParams());
p.disposition = NEW_FOREGROUND_TAB;
@@ -631,7 +631,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, TargetContents_ForegroundTab) {
}
#if defined(OS_WIN)
-// This tests adding a popup with a predefined TabContents.
+// This tests adding a popup with a predefined TabContentsWrapper.
IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, DISABLED_TargetContents_Popup) {
browser::NavigateParams p(MakeNavigateParams());
p.disposition = NEW_POPUP;
@@ -647,7 +647,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, DISABLED_TargetContents_Popup) {
// The web platform is weird. The window bounds specified in
// |p.window_bounds| are used as follows:
// - the origin is used to position the window
- // - the size is used to size the TabContents of the window.
+ // - the size is used to size the TabContentsWrapper of the window.
// As such the position of the resulting window will always match
// p.window_bounds.origin(), but its size will not. We need to match
// the size against the selected tab's view's container size.
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller_unittest.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller_unittest.mm
index 7cdc8c2..021ebf3 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller_unittest.mm
@@ -474,7 +474,7 @@ TEST_F(BookmarkBubbleControllerTest, BubbleGoesAwayOnNewTab) {
// Many of our browser objects (Browser, Profile, RequestContext)
// are "just enough" to run tests without being complete. Instead
// we fake the notification that would be triggered by a tab
- // creation. See TabContents::NotifyConnected().
+ // creation. See WebContents::NotifyConnected().
content::NotificationService::current()->Notify(
content::NOTIFICATION_WEB_CONTENTS_CONNECTED,
content::Source<WebContents>(NULL),
diff --git a/chrome/browser/ui/cocoa/constrained_window_mac.mm b/chrome/browser/ui/cocoa/constrained_window_mac.mm
index 4f8a254..5df9b85 100644
--- a/chrome/browser/ui/cocoa/constrained_window_mac.mm
+++ b/chrome/browser/ui/cocoa/constrained_window_mac.mm
@@ -102,7 +102,7 @@ ConstrainedWindowMac::~ConstrainedWindowMac() {}
void ConstrainedWindowMac::ShowConstrainedWindow() {
should_be_visible_ = true;
- // The TabContents only has a native window if it is currently visible. In
+ // The WebContents only has a native window if it is currently visible. In
// this case, open the sheet now. Else, Realize() will be called later, when
// our tab becomes visible.
NSWindow* browserWindow =
diff --git a/chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.h b/chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.h
index 5ae4682..57eb565 100644
--- a/chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.h
+++ b/chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.h
@@ -99,7 +99,7 @@ class CollectedCookiesMac : public ConstrainedWindowMacDelegateCustomSheet,
@property(assign, nonatomic) BOOL allowedCookiesButtonsEnabled;
@property(assign, nonatomic) BOOL blockedCookiesButtonsEnabled;
-// Designated initializer. TabContents cannot be NULL.
+// Designated initializer. TabContentsWrapper cannot be NULL.
- (id)initWithTabContentsWrapper:(TabContentsWrapper*)wrapper;
// Closes the sheet and ends the modal loop. This will also cleanup the memory.
diff --git a/chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm b/chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm
index 51f05a1..835007b 100644
--- a/chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm
+++ b/chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm
@@ -72,8 +72,8 @@ const float kRightEdgeOffset = 25;
}
- (void)dealloc {
- // All animations should be explicitly stopped by the TabContents before a tab
- // is closed.
+ // All animations should be explicitly stopped by the TabContentsWrapper
+ // before a tab is closed.
DCHECK(!showHideAnimation_.get());
DCHECK(!moveAnimation_.get());
[[NSNotificationCenter defaultCenter] removeObserver:self];
diff --git a/chrome/browser/ui/cocoa/infobars/infobar_container_controller.h b/chrome/browser/ui/cocoa/infobars/infobar_container_controller.h
index 00da833..e928cec 100644
--- a/chrome/browser/ui/cocoa/infobars/infobar_container_controller.h
+++ b/chrome/browser/ui/cocoa/infobars/infobar_container_controller.h
@@ -52,7 +52,7 @@ const CGFloat kTipHeight = 12.0;
// Needed to send resize messages when infobars are added or removed.
id<ViewResizer> resizeDelegate_; // weak
- // The TabContents we are currently showing infobars for.
+ // The TabContentsWrapper we are currently showing infobars for.
TabContentsWrapper* currentTabContents_; // weak
// Holds the InfoBarControllers currently owned by this container.
diff --git a/chrome/browser/ui/cocoa/js_modal_dialog_cocoa.mm b/chrome/browser/ui/cocoa/js_modal_dialog_cocoa.mm
index 2570c76..742ffd0 100644
--- a/chrome/browser/ui/cocoa/js_modal_dialog_cocoa.mm
+++ b/chrome/browser/ui/cocoa/js_modal_dialog_cocoa.mm
@@ -76,7 +76,7 @@
case NSRunStoppedResponse: { // Window was closed underneath us
// Need to call OnCancel() because there is some cleanup that needs
// to be done. It won't call back to the javascript since the
- // JavaScriptAppModalDialog knows that the TabContents was destroyed.
+ // JavaScriptAppModalDialog knows that the WebContents was destroyed.
native_dialog->dialog()->OnCancel(shouldSuppress);
break;
}
diff --git a/chrome/browser/ui/cocoa/location_bar/content_setting_decoration.mm b/chrome/browser/ui/cocoa/location_bar/content_setting_decoration.mm
index 47610c7..e465271 100644
--- a/chrome/browser/ui/cocoa/location_bar/content_setting_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/content_setting_decoration.mm
@@ -380,6 +380,6 @@ void ContentSettingDecoration::AnimationTimerFired() {
// Even after the animation completes, the |animator_| object should be kept
// alive to prevent the animation from re-appearing if the page opens
// additional popups later. The animator will be cleared when the decoration
- // hides, indicating something has changed with the TabContents (probably
+ // hides, indicating something has changed with the WebContents (probably
// navigation).
}