diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-08 18:35:54 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-08 18:35:54 +0000 |
commit | fb6de399a7eead8338e4f49920feed47d122fec3 (patch) | |
tree | ce27a7a6d26e6e71709f5a58a4b5f00d39f80df9 /chrome/browser/cocoa | |
parent | f2f0a0b643f0edac8b346d2d53957d2a239699d0 (diff) | |
download | chromium_src-fb6de399a7eead8338e4f49920feed47d122fec3.zip chromium_src-fb6de399a7eead8338e4f49920feed47d122fec3.tar.gz chromium_src-fb6de399a7eead8338e4f49920feed47d122fec3.tar.bz2 |
Simplified the api by replacing them with single Show(false) call and cleaned up linux/mac code.
BUG=22036
TEST=None
Review URL: http://codereview.chromium.org/523125
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35803 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa')
-rw-r--r-- | chrome/browser/cocoa/find_bar_bridge.h | 4 | ||||
-rw-r--r-- | chrome/browser/cocoa/find_bar_bridge.mm | 17 |
2 files changed, 4 insertions, 17 deletions
diff --git a/chrome/browser/cocoa/find_bar_bridge.h b/chrome/browser/cocoa/find_bar_bridge.h index 970679c..ca9e27f 100644 --- a/chrome/browser/cocoa/find_bar_bridge.h +++ b/chrome/browser/cocoa/find_bar_bridge.h @@ -54,7 +54,7 @@ class FindBarBridge : public FindBar { } // Methods from FindBar. - virtual void Show(); + virtual void Show(bool animate); virtual void Hide(bool animate); virtual void SetFocusAndSelection(); virtual void ClearResults(const FindNotificationDetails& results); @@ -63,8 +63,6 @@ class FindBarBridge : public FindBar { virtual void UpdateUIForFindResult(const FindNotificationDetails& result, const string16& find_text); virtual void AudibleAlert(); - virtual gfx::Rect GetDialogPosition(gfx::Rect avoid_overlapping_rect); - virtual void SetDialogPosition(const gfx::Rect& new_pos, bool no_redraw); virtual bool IsFindBarVisible(); virtual void RestoreSavedFocus(); virtual void MoveWindowIfNecessary(const gfx::Rect& selection_rect, diff --git a/chrome/browser/cocoa/find_bar_bridge.mm b/chrome/browser/cocoa/find_bar_bridge.mm index c12a830..9b73254 100644 --- a/chrome/browser/cocoa/find_bar_bridge.mm +++ b/chrome/browser/cocoa/find_bar_bridge.mm @@ -16,8 +16,8 @@ FindBarBridge::FindBarBridge() FindBarBridge::~FindBarBridge() { } -void FindBarBridge::Show() { - [cocoa_controller_ showFindBar:YES]; // with animation. +void FindBarBridge::Show(bool animate) { + [cocoa_controller_ showFindBar:(animate ? YES : NO)]; } void FindBarBridge::Hide(bool animate) { @@ -52,24 +52,13 @@ bool FindBarBridge::IsFindBarVisible() { void FindBarBridge::MoveWindowIfNecessary(const gfx::Rect& selection_rect, bool no_redraw) { // http://crbug.com/11084 + // http://crbug.com/22036 } void FindBarBridge::StopAnimation() { [cocoa_controller_ stopAnimation]; } -gfx::Rect FindBarBridge::GetDialogPosition(gfx::Rect avoid_overlapping_rect) { - // http://crbug.com/22036 - return gfx::Rect(); -} - -void FindBarBridge::SetDialogPosition(const gfx::Rect& new_pos, - bool no_redraw) { - // TODO(rohitrao): Do something useful here. For now, just show the findbar. - // http://crbug.com/22036 - [cocoa_controller_ showFindBar:NO]; // Do not animate. -} - void FindBarBridge::RestoreSavedFocus() { [cocoa_controller_ restoreSavedFocus]; } |