Commit ca13a448 authored by avi@chromium.org's avatar avi@chromium.org

TabContents -> WebContentsImpl, part 16

Remove "tab contents".

BUG=105875
TEST=no change

Review URL: https://chromiumcodereview.appspot.com/9956154

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132571 0039d316-1c4b-4281-b951-d872f2087c98
parent 93425b44
......@@ -114,7 +114,7 @@ class CONTENT_EXPORT BrowserAccessibilityManager {
const BrowserAccessibility& node, gfx::Rect subfocus);
// Tell the renderer to scroll such that |node| is at |point|,
// where |point| is in global coordinates of the tab contents.
// where |point| is in global coordinates of the WebContents.
void ScrollToPoint(
const BrowserAccessibility& node, gfx::Point point);
......
......@@ -95,7 +95,7 @@ void BrowserPluginWebContentsObserver::OnOpenChannelToBrowserPlugin(
browser_context,
site_instance,
MSG_ROUTING_NONE,
NULL, // base tab contents
NULL, // base WebContents
NULL // session storage namespace
));
// TODO(fsamuel): Set the WebContentsDelegate here.
......
......@@ -65,7 +65,7 @@ TEST(WebContentsDelegateTest, UnregisterInDestructor) {
EXPECT_TRUE(contents_a->GetDelegate() == NULL);
EXPECT_TRUE(contents_b->GetDelegate() == NULL);
// Destroy the tab contents and run the message loop to prevent leaks.
// Destroy the WebContentses and run the message loop to prevent leaks.
contents_a.reset(NULL);
contents_b.reset(NULL);
loop.RunAllPending();
......
......@@ -302,8 +302,8 @@ WebContentsImpl::WebContentsImpl(
}
CHECK(view_.get());
// We have the initial size of the view be based on the size of the passed in
// tab contents (normally a tab from the same window).
// We have the initial size of the view be based on the size of the view of
// the passed in WebContents.
view_->CreateView(base_web_contents ?
base_web_contents->GetView()->GetContainerSize() : gfx::Size());
......@@ -328,7 +328,7 @@ WebContentsImpl::~WebContentsImpl() {
NotifyDisconnected();
// Notify any observer that have a reference on this tab contents.
// Notify any observer that have a reference on this WebContents.
content::NotificationService::current()->Notify(
content::NOTIFICATION_WEB_CONTENTS_DESTROYED,
content::Source<WebContents>(this),
......
......@@ -584,7 +584,7 @@ class CONTENT_EXPORT WebContentsImpl
base::TerminationStatus crashed_status_;
int crashed_error_code_;
// Whether this tab contents is waiting for a first-response for the
// Whether this WebContents is waiting for a first-response for the
// main resource of the page. This controls whether the throbber state is
// "waiting" or "loading."
bool waiting_for_response_;
......@@ -622,8 +622,7 @@ class CONTENT_EXPORT WebContentsImpl
// Data for misc internal state ----------------------------------------------
// Whether the tab contents is currently being screenshotted by the
// DraggedTabController.
// Whether the WebContents is currently being screenshotted.
bool capturing_contents_;
// See getter above.
......
......@@ -139,8 +139,8 @@ class CONTENT_EXPORT WebContentsViewGtk : public WebContentsView {
// hierarchy.
scoped_ptr<WebContentsViewDelegate> delegate_;
// The size we want the tab contents view to be. We keep this in a separate
// variable because resizing in GTK+ is async.
// The size we want the view to be. We keep this in a separate variable
// because resizing in GTK+ is async.
gfx::Size requested_size_;
DISALLOW_COPY_AND_ASSIGN(WebContentsViewGtk);
......
......@@ -47,7 +47,7 @@ WebDragDestGtk::WebDragDestGtk(WebContents* web_contents, GtkWidget* widget)
g_signal_connect(widget, "drag-data-received",
G_CALLBACK(OnDragDataReceivedThunk), this);
// TODO(tony): Need a drag-data-delete handler for moving content out of
// the tab contents. http://crbug.com/38989
// the WebContents. http://crbug.com/38989
destroy_handler_ = g_signal_connect(
widget, "destroy", G_CALLBACK(gtk_widget_destroyed), &widget_);
......
......@@ -35,8 +35,7 @@ class CONTENT_EXPORT WebDragSourceGtk : public MessageLoopForUI::Observer {
explicit WebDragSourceGtk(WebContents* web_contents);
virtual ~WebDragSourceGtk();
// Starts a drag for the tab contents this WebDragSourceGtk was
// created for.
// Starts a drag for the WebContents this WebDragSourceGtk was created for.
void StartDragging(const WebDropData& drop_data,
WebKit::WebDragOperationsMask allowed_ops,
GdkEventButton* last_mouse_down,
......
......@@ -113,7 +113,7 @@ void WebDragSource::Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
if (content::NOTIFICATION_WEB_CONTENTS_SWAPPED == type) {
// When the tab contents get swapped, our render view host goes away.
// When the WebContents get swapped, our render view host goes away.
// That's OK, we can continue the drag, we just can't send messages back to
// our drag source.
render_view_host_ = NULL;
......
......@@ -158,8 +158,8 @@ IPC_MESSAGE_ROUTED2(AccessibilityMsg_ScrollToMakeVisible,
gfx::Rect /* subfocus */)
// Relay a request from assistive technology to move a given object
// to a specific location, in the tab content area coordinate space, i.e.
// (0, 0) is the top-left corner of the tab contents.
// to a specific location, in the WebContents area coordinate space, i.e.
// (0, 0) is the top-left corner of the WebContents.
IPC_MESSAGE_ROUTED2(AccessibilityMsg_ScrollToPoint,
int /* object id */,
gfx::Point /* new location */)
......
......@@ -50,11 +50,12 @@ struct RendererPreferences;
// Describes what goes in the main content area of a tab.
class WebContents : public PageNavigator {
public:
// |base_web_contents| is used if we want to size the new web contents view
// based on an existing web contents view. This can be NULL if not needed.
// |base_tab_contents| is used if we want to size the new WebContents's view
// based on the view of an existing WebContents. This can be NULL if not
// needed.
//
// The session storage namespace parameter allows multiple render views and
// tab contentses to share the same session storage (part of the WebStorage
// web contentses to share the same session storage (part of the WebStorage
// spec) space. This is useful when restoring tabs, but most callers should
// pass in NULL which will cause a new SessionStorageNamespace to be created.
CONTENT_EXPORT static WebContents* Create(
......@@ -68,7 +69,7 @@ class WebContents : public PageNavigator {
// Intrinsic tab state -------------------------------------------------------
// Returns the property bag for this tab contents, where callers can add
// Returns the property bag for this WebContents, where callers can add
// extra data they may wish to associate with the tab. Returns a pointer
// rather than a reference since the PropertyAccessors expect this.
virtual const base::PropertyBag* GetPropertyBag() const = 0;
......@@ -78,7 +79,7 @@ class WebContents : public PageNavigator {
virtual WebContentsDelegate* GetDelegate() = 0;
virtual void SetDelegate(WebContentsDelegate* delegate) = 0;
// Gets the controller for this tab contents.
// Gets the controller for this WebContents.
virtual NavigationController& GetController() = 0;
virtual const NavigationController& GetController() const = 0;
......@@ -143,10 +144,10 @@ class WebContents : public PageNavigator {
// returns the current SiteInstance.
virtual SiteInstance* GetPendingSiteInstance() const = 0;
// Return whether this tab contents is loading a resource.
// Return whether this WebContents is loading a resource.
virtual bool IsLoading() const = 0;
// Returns whether this tab contents is waiting for a first-response for the
// Returns whether this WebContents is waiting for a first-response for the
// main resource of the page.
virtual bool IsWaitingForResponse() const = 0;
......@@ -166,8 +167,8 @@ class WebContents : public PageNavigator {
// Internal state ------------------------------------------------------------
// This flag indicates whether the tab contents is currently being
// screenshotted by the DraggedTabController.
// This flag indicates whether the WebContents is currently being
// screenshotted.
virtual void SetCapturingContents(bool cap) = 0;
// Indicates whether this tab should be considered crashed. The setter will
......@@ -186,12 +187,12 @@ class WebContents : public PageNavigator {
// change. See InvalidateType enum.
virtual void NotifyNavigationStateChanged(unsigned changed_flags) = 0;
// Invoked when the tab contents becomes selected. If you override, be sure
// Invoked when the WebContents becomes selected. If you override, be sure
// and invoke super's implementation.
virtual void DidBecomeSelected() = 0;
virtual base::TimeTicks GetLastSelectedTime() const = 0;
// Invoked when the tab contents becomes hidden.
// Invoked when the WebContents becomes hidden.
// NOTE: If you override this, call the superclass version too!
virtual void WasHidden() = 0;
......@@ -311,7 +312,7 @@ class WebContents : public PageNavigator {
virtual bool ShouldAcceptDragAndDrop() const = 0;
// A render view-originated drag has ended. Informs the render view host and
// tab contents delegate.
// WebContentsDelegate.
virtual void SystemDragEnded() = 0;
// Indicates if this tab was explicitly closed by the user (control-w, close
......
......@@ -77,7 +77,7 @@ class CONTENT_EXPORT WebContentsDelegate {
virtual WebContents* OpenURLFromTab(WebContents* source,
const OpenURLParams& params);
// Called to inform the delegate that the tab content's navigation state
// Called to inform the delegate that the WebContents's navigation state
// changed. The |changed_flags| indicates the parts of the navigation state
// that have been updated, and is any combination of the
// |WebContents::InvalidateTypes| bits.
......@@ -125,7 +125,7 @@ class CONTENT_EXPORT WebContentsDelegate {
// out so it can perform any cleanup necessary.
virtual void SwappedOut(WebContents* source) {}
// Request the delegate to move this tab contents to the specified position
// Request the delegate to move this WebContents to the specified position
// in screen coordinates.
virtual void MoveContents(WebContents* source, const gfx::Rect& pos) {}
......@@ -233,7 +233,7 @@ class CONTENT_EXPORT WebContentsDelegate {
// Returns true if the context menu command was handled
virtual bool ExecuteContextMenuCommand(int command);
// Opens source view for given tab contents that is navigated to the given
// Opens source view for given WebContents that is navigated to the given
// page url.
virtual void ViewSourceForTab(WebContents* source, const GURL& page_url);
......@@ -267,13 +267,13 @@ class CONTENT_EXPORT WebContentsDelegate {
// Returns true to allow WebContents to continue with the default processing.
virtual bool OnGoToEntryOffset(int offset);
// Returns whether this tab contents should add the specified navigation to
// Returns whether this WebContents should add the specified navigation to
// history.
virtual bool ShouldAddNavigationToHistory(
const history::HistoryAddPageArgs& add_page_args,
NavigationType navigation_type);
// Returns the native window framing the view containing the tab contents.
// Returns the native window framing the view containing the WebContents.
virtual gfx::NativeWindow GetFrameNativeWindow();
// Allows delegate to control whether a WebContents will be created. Returns
......
......@@ -90,7 +90,7 @@ class CONTENT_EXPORT WebContentsView
// Sets focus to the native widget for this tab.
virtual void Focus() = 0;
// Sets focus to the appropriate element when the tab contents is shown the
// Sets focus to the appropriate element when the WebContents is shown the
// first time.
virtual void SetInitialFocus() = 0;
......@@ -102,7 +102,7 @@ class CONTENT_EXPORT WebContentsView
virtual void RestoreFocus() = 0;
// If we try to close the tab while a drag is in progress, we crash. These
// methods allow the tab contents to determine if a drag is in progress and
// methods allow the WebContents to determine if a drag is in progress and
// postpone the tab closing.
virtual bool IsDoingDrag() const = 0;
virtual void CancelDragAndCloseTab() = 0;
......
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
......
......@@ -14,7 +14,7 @@
IPC_MESSAGE_ROUTED1(ShellViewMsg_CaptureTextDump,
bool /* recursive */)
// Send a text dump of the tab contents to the render host.
// Send a text dump of the WebContents to the render host.
IPC_MESSAGE_ROUTED1(ShellViewHostMsg_TextDump,
std::string /* dump */)
......
......@@ -127,10 +127,10 @@ class RenderViewHostTestHarness : public testing::Test {
BrowserContext* browser_context();
MockRenderProcessHost* process();
// Frees the current tab contents for tests that want to test destruction.
// Frees the current WebContents for tests that want to test destruction.
void DeleteContents();
// Sets the current tab contents for tests that want to alter it. Takes
// Sets the current WebContents for tests that want to alter it. Takes
// ownership of the WebContents passed.
virtual void SetContents(WebContents* contents);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment