summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser.cc
diff options
context:
space:
mode:
authorbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-21 15:03:01 +0000
committerbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-21 15:03:01 +0000
commit9e0534be9784821a8507f20a873d6410b21680e5 (patch)
treec6dd8baa8bf9986df0168cf54c6a5c8b5c49e0e9 /chrome/browser/browser.cc
parent1c023d6ec42e2dd30e8a31edbb2cdd49db86cfc4 (diff)
downloadchromium_src-9e0534be9784821a8507f20a873d6410b21680e5.zip
chromium_src-9e0534be9784821a8507f20a873d6410b21680e5.tar.gz
chromium_src-9e0534be9784821a8507f20a873d6410b21680e5.tar.bz2
Factor find in page out of WebContents and into the view, since it is almost
all view specific. Rename find in page controller to be "FindBarWin", and find in page view to be "findBarView" (since this is not Windows specific, but "Views" specific). I did lots of simplification and moving around of the find in page API. I coalesced several of the show functions into one master function on the view. I removed some other sizing and window updating code from WebContents and moved it to the view. Review URL: http://codereview.chromium.org/7667 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3654 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser.cc')
-rw-r--r--chrome/browser/browser.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc
index cf88a6c..d7fd0fe 100644
--- a/chrome/browser/browser.cc
+++ b/chrome/browser/browser.cc
@@ -1312,7 +1312,10 @@ void Browser::CreateNewStripWithContents(TabContents* detached_contents,
// When we detach a tab we need to make sure any associated Find window moves
// along with it to its new home (basically we just make new_window the parent
// of the Find window).
- new_window->AdoptFindWindow(detached_contents);
+ // TODO(brettw) this could probably be improved, see
+ // WebContentsView::ReparentFindWindow for more.
+ if (detached_contents->AsWebContents())
+ detached_contents->AsWebContents()->view()->ReparentFindWindow(new_window);
}
int Browser::GetDragActions() const {
@@ -1383,7 +1386,10 @@ void Browser::TabInsertedAt(TabContents* contents,
// associated Find window is moved along with it. We therefore change the
// parent of the Find window (if the parent is already correctly set this
// does nothing).
- AdoptFindWindow(contents);
+ // TODO(brettw) this could probably be improved, see
+ // WebContentsView::ReparentFindWindow for more.
+ if (contents->AsWebContents())
+ contents->AsWebContents()->view()->ReparentFindWindow(this);
// If the tab crashes in the beforeunload or unload handler, it won't be
// able to ack. But we know we can close it.