summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents/web_contents_view.h
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-12 00:21:28 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-12 00:21:28 +0000
commit401513c474b3520fe784c03e068a15fc6655d6e1 (patch)
tree9d5368feb8f3a668ec4523e90bc9694bcfc3a9d3 /chrome/browser/tab_contents/web_contents_view.h
parenta8e9b16e3e3f944d0eaf7f91e5cc96a7b2c914d3 (diff)
downloadchromium_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/web_contents_view.h')
-rw-r--r--chrome/browser/tab_contents/web_contents_view.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/chrome/browser/tab_contents/web_contents_view.h b/chrome/browser/tab_contents/web_contents_view.h
index f9d7075..52fceba 100644
--- a/chrome/browser/tab_contents/web_contents_view.h
+++ b/chrome/browser/tab_contents/web_contents_view.h
@@ -115,6 +115,17 @@ class WebContentsView : public RenderViewHostDelegate::View {
// page.
virtual void ForwardMessageToDevToolsClient(const IPC::Message& message) = 0;
+ // Sets focus to the appropriate element when the tab contents is shown the
+ // first time.
+ virtual void SetInitialFocus() = 0;
+
+ // Stores the currently focused view.
+ virtual void StoreFocus() = 0;
+
+ // Restores focus to the last focus view. If StoreFocus has not yet been
+ // invoked, SetInitialFocus is invoked.
+ virtual void RestoreFocus() = 0;
+
protected:
WebContentsView() {} // Abstract interface.