summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-08 22:09:21 +0000
committerrohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-08 22:09:21 +0000
commit4c2cb4a0f63198c536dc872963aafa063bbcb932 (patch)
treea9b96beac8109ae75fe5d82865f9519f3f66f20c
parentc646f7c7cd58aba3a5c4cca7a0154aed09b76f38 (diff)
downloadchromium_src-4c2cb4a0f63198c536dc872963aafa063bbcb932.zip
chromium_src-4c2cb4a0f63198c536dc872963aafa063bbcb932.tar.gz
chromium_src-4c2cb4a0f63198c536dc872963aafa063bbcb932.tar.bz2
Makes the arguments to GetFindBarWindowInfo optional. Corrects a comment specifying otherwise.
BUG=46074 TEST=None Review URL: http://codereview.chromium.org/2764002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49193 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/cocoa/find_bar_bridge.mm12
-rw-r--r--chrome/browser/find_bar.h2
2 files changed, 8 insertions, 6 deletions
diff --git a/chrome/browser/cocoa/find_bar_bridge.mm b/chrome/browser/cocoa/find_bar_bridge.mm
index 299a17b..3c97412 100644
--- a/chrome/browser/cocoa/find_bar_bridge.mm
+++ b/chrome/browser/cocoa/find_bar_bridge.mm
@@ -73,14 +73,16 @@ void FindBarBridge::RestoreSavedFocus() {
bool FindBarBridge::GetFindBarWindowInfo(gfx::Point* position,
bool* fully_visible) {
// TODO(rohitrao): Return the proper position. http://crbug.com/22036
- *position = gfx::Point(0, 0);
+ if (position)
+ *position = gfx::Point(0, 0);
NSWindow* window = [[cocoa_controller_ view] window];
bool window_visible = [window isVisible] ? true : false;
- *fully_visible = window_visible &&
- [cocoa_controller_ isFindBarVisible] &&
- ![cocoa_controller_ isFindBarAnimating];
-
+ if (fully_visible) {
+ *fully_visible = window_visible &&
+ [cocoa_controller_ isFindBarVisible] &&
+ ![cocoa_controller_ isFindBarAnimating];
+ }
return window_visible;
}
diff --git a/chrome/browser/find_bar.h b/chrome/browser/find_bar.h
index e95e8a1..b0062fbf 100644
--- a/chrome/browser/find_bar.h
+++ b/chrome/browser/find_bar.h
@@ -81,7 +81,7 @@ class FindBarTesting {
// Computes the location of the find bar and whether it is fully visible in
// its parent window. The return value indicates if the window is visible at
- // all. Both out arguments are required.
+ // all. Both out arguments are optional.
//
// This is used for UI tests of the find bar. If the find bar is not currently
// shown (return value of false), the out params will be {(0, 0), false}.