diff options
author | finnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-24 00:10:29 +0000 |
---|---|---|
committer | finnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-24 00:10:29 +0000 |
commit | 4f3dc3751d69f9db1f8ef533a3335201b3bc78bc (patch) | |
tree | e37efecf992ddd4e901c894273cbb1e5bf4260cc /chrome/browser/cocoa | |
parent | 5e7f161f73f1817b8a0c422c0e4b5eceae6954e7 (diff) | |
download | chromium_src-4f3dc3751d69f9db1f8ef533a3335201b3bc78bc.zip chromium_src-4f3dc3751d69f9db1f8ef533a3335201b3bc78bc.tar.gz chromium_src-4f3dc3751d69f9db1f8ef533a3335201b3bc78bc.tar.bz2 |
The find bar should be owned and managed from the BrowserView, not the WebContentsView, since it's part of the "chrome".
Design Doc: http://dev.chromium.org/developers/design-documents/find-bar
Things done:
- Pulled all of the find bar stuff out of WebContentsView* since it's no longer needed.
- Moved OnFindReply delegate method from RenderViewHostDelegate::View to RenderViewHostDelegate, since it's no longer implemented on the view.
- Moved find control methods to WebContents.
- Added recent find result state to WebContents.
- Updated the UI tests to accommodate the changes in the state that is broadcast when results are discovered.
- Updated the find bar layout to obtain its bounding box from the BrowserView, which knows about toolbars, bookmark bars etc.
- Updated the find bar itself to handle the fact that it can be displayed for multiple different tabs.
- Moved the find bar manipulation methods for testing from TabProxy to BrowserProxy, since the find bar is now a feature of the window, not the tab.
- view.h: Don't lay out child views again if they have a layout manager, it already updated them.
TEST=Find box should work as before.
BUG=3245
Review URL: http://codereview.chromium.org/27025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10231 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa')
-rw-r--r-- | chrome/browser/cocoa/browser_window_cocoa.h | 12 | ||||
-rw-r--r-- | chrome/browser/cocoa/browser_window_cocoa.mm | 4 |
2 files changed, 10 insertions, 6 deletions
diff --git a/chrome/browser/cocoa/browser_window_cocoa.h b/chrome/browser/cocoa/browser_window_cocoa.h index 1f7f59b..d4b3ffb 100644 --- a/chrome/browser/cocoa/browser_window_cocoa.h +++ b/chrome/browser/cocoa/browser_window_cocoa.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_WINDOW_COCOA_H_ -#define CHROME_BROWSER_WINDOW_COCOA_H_ +#ifndef CHROME_BROWSER_COCOA_BROWSER_WINDOW_COCOA_H_ +#define CHROME_BROWSER_COCOA_BROWSER_WINDOW_COCOA_H_ #include "chrome/browser/browser_window.h" @@ -18,7 +18,7 @@ class BrowserWindowCocoa : public BrowserWindow { public: BrowserWindowCocoa(BrowserWindowController* controller, NSWindow* window); virtual ~BrowserWindowCocoa(); - + // Overridden from BrowserWindow virtual void Init(); virtual void Show(); @@ -46,6 +46,7 @@ class BrowserWindowCocoa : public BrowserWindow { virtual bool IsBookmarkBarVisible() const; virtual gfx::Rect GetRootWindowResizerRect() const; virtual void ToggleBookmarkBar(); + virtual void ShowFindBar(); virtual void ShowAboutChromeDialog(); virtual void ShowBookmarkManager(); virtual void ShowBookmarkBubble(const GURL& url, bool already_bookmarked); @@ -58,13 +59,12 @@ class BrowserWindowCocoa : public BrowserWindow { virtual void ShowNewProfileDialog(); virtual void ShowHTMLDialog(HtmlDialogContentsDelegate* delegate, void* parent_window); - protected: virtual void DestroyBrowser(); - + private: BrowserWindowController* controller_; // weak, owns us NSWindow* window_; // weak, owned by |controller_| }; -#endif // CHROME_BROWSER_WINDOW_COCOA_H_ +#endif // CHROME_BROWSER_COCOA_BROWSER_WINDOW_COCOA_H_ diff --git a/chrome/browser/cocoa/browser_window_cocoa.mm b/chrome/browser/cocoa/browser_window_cocoa.mm index d54d0c7..6af331b 100644 --- a/chrome/browser/cocoa/browser_window_cocoa.mm +++ b/chrome/browser/cocoa/browser_window_cocoa.mm @@ -135,6 +135,10 @@ void BrowserWindowCocoa::ToggleBookmarkBar() { NOTIMPLEMENTED(); } +void BrowserWindowCocoa::ShowFindBar() { + NOTIMPLEMENTED(); +} + void BrowserWindowCocoa::ShowAboutChromeDialog() { NOTIMPLEMENTED(); } |