diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-15 15:39:24 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-15 15:39:24 +0000 |
commit | 9973ceb80aa79dc730b9f39e9666a7ad28130d39 (patch) | |
tree | 1f3f88af9c4b148fa65faee200f08eced79741fb /chrome/common/platform_util_mac.mm | |
parent | df3f913f9956fc93a635a4f233d4f0a656a8a6df (diff) | |
download | chromium_src-9973ceb80aa79dc730b9f39e9666a7ad28130d39.zip chromium_src-9973ceb80aa79dc730b9f39e9666a7ad28130d39.tar.gz chromium_src-9973ceb80aa79dc730b9f39e9666a7ad28130d39.tar.bz2 |
Implement some Mac platform utils.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/274058
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29120 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/platform_util_mac.mm')
-rw-r--r-- | chrome/common/platform_util_mac.mm | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/chrome/common/platform_util_mac.mm b/chrome/common/platform_util_mac.mm index 6d648d8..7cb1df5 100644 --- a/chrome/common/platform_util_mac.mm +++ b/chrome/common/platform_util_mac.mm @@ -58,13 +58,15 @@ string16 GetWindowTitle(gfx::NativeWindow window) { } bool IsWindowActive(gfx::NativeWindow window) { - NOTIMPLEMENTED(); - return false; + return [window isKeyWindow] || [window isMainWindow]; } bool IsVisible(gfx::NativeView view) { - NOTIMPLEMENTED(); - return true; + // A reasonable approximation of how you'd expect this to behave. + return (view && + ![view isHiddenOrHasHiddenAncestor] && + [view window] && + [[view window] isVisible]); } } // namespace platform_util |