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/gtk/find_bar_gtk.h | |
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/gtk/find_bar_gtk.h')
-rw-r--r-- | chrome/browser/gtk/find_bar_gtk.h | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/chrome/browser/gtk/find_bar_gtk.h b/chrome/browser/gtk/find_bar_gtk.h index 137b2c3..bad7122 100644 --- a/chrome/browser/gtk/find_bar_gtk.h +++ b/chrome/browser/gtk/find_bar_gtk.h @@ -1,5 +1,5 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be +// Copyright (c) 2009 The Chromium Authors. All rights reserved. Use +// of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_GTK_FIND_BAR_GTK_H_ @@ -45,7 +45,7 @@ class FindBarGtk : public FindBar, virtual void SetFindBarController(FindBarController* find_bar_controller) { find_bar_controller_ = find_bar_controller; } - virtual void Show(); + virtual void Show(bool animate); virtual void Hide(bool animate); virtual void SetFocusAndSelection(); virtual void ClearResults(const FindNotificationDetails& results); @@ -56,8 +56,6 @@ class FindBarGtk : 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 FindBarTesting* GetFindBarTesting(); @@ -93,6 +91,17 @@ class FindBarGtk : public FindBar, // Asynchronously repositions the dialog. void Reposition(); + // Returns the rectangle representing where to position the find bar. If + // |avoid_overlapping_rect| is specified, the return value will be a rectangle + // located immediately to the left of |avoid_overlapping_rect|, as long as + // there is enough room for the dialog to draw within the bounds. If not, the + // dialog position returned will overlap |avoid_overlapping_rect|. + // Note: |avoid_overlapping_rect| is expected to use coordinates relative to + // the top of the page area, (it will be converted to coordinates relative to + // the top of the browser window, when comparing against the dialog + // coordinates). The returned value is relative to the browser window. + gfx::Rect GetDialogPosition(gfx::Rect avoid_overlapping_rect); + static void OnParentSet(GtkWidget* widget, GtkObject* old_parent, FindBarGtk* find_bar); |