| Index: chrome/browser/ui/tab_contents/tab_contents.h
|
| diff --git a/chrome/browser/ui/tab_contents/tab_contents_wrapper.h b/chrome/browser/ui/tab_contents/tab_contents.h
|
| similarity index 89%
|
| copy from chrome/browser/ui/tab_contents/tab_contents_wrapper.h
|
| copy to chrome/browser/ui/tab_contents/tab_contents.h
|
| index 3bff9f272b290864bf73c6a935043394bed00dc2..e15ed2331f033e410a52262bca61cecb54afd9c0 100644
|
| --- a/chrome/browser/ui/tab_contents/tab_contents_wrapper.h
|
| +++ b/chrome/browser/ui/tab_contents/tab_contents.h
|
| @@ -2,8 +2,8 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_WRAPPER_H_
|
| -#define CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_WRAPPER_H_
|
| +#ifndef CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_H_
|
| +#define CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_H_
|
| #pragma once
|
|
|
| #include "base/basictypes.h"
|
| @@ -74,9 +74,9 @@ class SafeBrowsingTabObserver;
|
| // Wraps WebContents and all of its supporting objects in order to control
|
| // their ownership and lifetime.
|
| //
|
| -// WARNING: Not every place where HTML can run has a TabContentsWrapper. This
|
| -// class is *only* used in a visible, actual, tab inside a browser. Examples of
|
| -// things that do not have tab wrappers include:
|
| +// WARNING: Not every place where HTML can run has a TabContents. This class is
|
| +// *only* used in a visible, actual, tab inside a browser. Examples of things
|
| +// that do not have a TabContents include:
|
| // - Extension background pages and popup bubbles
|
| // - HTML notification bubbles
|
| // - Screensavers on Chrome OS
|
| @@ -89,35 +89,35 @@ class SafeBrowsingTabObserver;
|
| //
|
| // TODO(avi): Eventually, this class will become TabContents as far as
|
| // the browser front-end is concerned.
|
| -class TabContentsWrapper : public content::WebContentsObserver {
|
| +class TabContents : public content::WebContentsObserver {
|
| public:
|
| // Takes ownership of |contents|, which must be heap-allocated (as it lives
|
| // in a scoped_ptr) and can not be NULL.
|
| - explicit TabContentsWrapper(content::WebContents* contents);
|
| - virtual ~TabContentsWrapper();
|
| + explicit TabContents(content::WebContents* contents);
|
| + virtual ~TabContents();
|
|
|
| - // Create a TabContentsWrapper with the same state as this one. The returned
|
| + // Create a TabContents with the same state as this one. The returned
|
| // heap-allocated pointer is owned by the caller.
|
| - TabContentsWrapper* Clone();
|
| + TabContents* Clone();
|
|
|
| - // Helper to retrieve the existing instance that wraps a given WebContents.
|
| + // Helper to retrieve the existing instance that owns a given WebContents.
|
| // Returns NULL if there is no such existing instance.
|
| // NOTE: This is not intended for general use. It is intended for situations
|
| // like callbacks from content/ where only a WebContents is available. In the
|
| - // general case, please do NOT use this; plumb TabContentsWrapper through the
|
| - // chrome/ code instead of WebContents.
|
| - static TabContentsWrapper* GetCurrentWrapperForContents(
|
| + // general case, please do NOT use this; plumb TabContents through the chrome/
|
| + // code instead of WebContents.
|
| + static TabContents* GetCurrentWrapperForContents(
|
| content::WebContents* contents);
|
| - static const TabContentsWrapper* GetCurrentWrapperForContents(
|
| + static const TabContents* GetCurrentWrapperForContents(
|
| const content::WebContents* contents);
|
|
|
| - // Returns the WebContents that this wraps.
|
| + // Returns the WebContents that this owns.
|
| content::WebContents* web_contents() const;
|
|
|
| - // Returns the Profile that is associated with this TabContentsWrapper.
|
| + // Returns the Profile that is associated with this TabContents.
|
| Profile* profile() const;
|
|
|
| - // True if this TabContentsWrapper is being torn down.
|
| + // True if this TabContents is being torn down.
|
| bool in_destructor() const { return in_destructor_; }
|
|
|
| // Tab Helpers ---------------------------------------------------------------
|
| @@ -229,7 +229,7 @@ class TabContentsWrapper : public content::WebContentsObserver {
|
| private:
|
| // Used to retrieve this object from |web_contents_|, which is placed in
|
| // its property bag to avoid adding additional interfaces.
|
| - static base::PropertyAccessor<TabContentsWrapper*>* property_accessor();
|
| + static base::PropertyAccessor<TabContents*>* property_accessor();
|
|
|
| // Tab Helpers ---------------------------------------------------------------
|
| // (These provide API for callers and have a getter function listed in the
|
| @@ -305,7 +305,7 @@ class TabContentsWrapper : public content::WebContentsObserver {
|
| // in the list.
|
| scoped_ptr<content::WebContents> web_contents_;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(TabContentsWrapper);
|
| + DISALLOW_COPY_AND_ASSIGN(TabContents);
|
| };
|
|
|
| -#endif // CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_WRAPPER_H_
|
| +#endif // CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_H_
|
|
|