diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-12 00:21:28 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-12 00:21:28 +0000 |
commit | 401513c474b3520fe784c03e068a15fc6655d6e1 (patch) | |
tree | 9d5368feb8f3a668ec4523e90bc9694bcfc3a9d3 /chrome/browser/tab_contents/tab_contents.h | |
parent | a8e9b16e3e3f944d0eaf7f91e5cc96a7b2c914d3 (diff) | |
download | chromium_src-401513c474b3520fe784c03e068a15fc6655d6e1.zip chromium_src-401513c474b3520fe784c03e068a15fc6655d6e1.tar.gz chromium_src-401513c474b3520fe784c03e068a15fc6655d6e1.tar.bz2 |
Moving the storing/restoring of the focus from TabContents to WebContentsView. This makes TabContents less dependent on views.
This requires few contortions with DOMUIs (NTP, history and downloads tab) as they still need to set the initial focus specifically.
BUG=None
TEST=Run the interactive tests.
Review URL: http://codereview.chromium.org/39269
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11501 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents/tab_contents.h')
-rw-r--r-- | chrome/browser/tab_contents/tab_contents.h | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/chrome/browser/tab_contents/tab_contents.h b/chrome/browser/tab_contents/tab_contents.h index 7d0e562..d28e068 100644 --- a/chrome/browser/tab_contents/tab_contents.h +++ b/chrome/browser/tab_contents/tab_contents.h @@ -37,6 +37,7 @@ class WindowDelegate; } class BlockedPopupContainer; +class DOMUIContents; class DOMUIHost; class DownloadItem; class DownloadShelf; @@ -141,6 +142,9 @@ class TabContents : public PageNavigator, // Returns this object as a DOMUIHost if it is one, and NULL otherwise. virtual DOMUIHost* AsDOMUIHost() { return NULL; } + // Returns this object as a DOMUIContents if it is one, and NULL otherwise. + virtual DOMUIContents* AsDOMUIContents() { return NULL; } + TabContentsDelegate* delegate() const { return delegate_; } void set_delegate(TabContentsDelegate* d) { delegate_ = d; } @@ -373,13 +377,6 @@ class TabContents : public PageNavigator, // Make the tab the focused window. virtual void Focus(); - // Stores the currently focused view. - virtual void StoreFocus(); - - // Restores focus to the last focus view. If StoreFocus has not yet been - // invoked, SetInitialFocus is invoked. - virtual void RestoreFocus(); - // Invoked the first time this tab is getting the focus through TAB traversal. // By default this does nothing, but is overridden to set the focus for the // first element in the page. @@ -450,12 +447,6 @@ class TabContents : public PageNavigator, // Called when a ConstrainedWindow we own is moved or resized. void DidMoveOrResize(ConstrainedWindow* window); - // Sets focus to the tab contents window, but doesn't actually set focus to - // a particular element in it (see also SetInitialFocus(bool) which does - // that in different circumstances). - // FIXME(brettw) having two SetInitialFocus that do different things is silly. - virtual void SetInitialFocus(); - protected: // NotificationObserver implementation: virtual void Observe(NotificationType type, @@ -548,9 +539,6 @@ class TabContents : public PageNavigator, // each SiteInstance. int32 max_page_id_; - // The id used in the ViewStorage to store the last focused view. - int last_focused_view_storage_id_; - // See capturing_contents() above. bool capturing_contents_; |