summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-15 22:19:17 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-15 22:19:17 +0000
commitbd1ad684dee1355226c5f6946034369b98186a55 (patch)
treef96a5a2e95a8a14aa35dd07a94578d5cc66d0c02 /chrome/common
parentf363a3a828686f6aad65501abe7b33b0d4d13d32 (diff)
downloadchromium_src-bd1ad684dee1355226c5f6946034369b98186a55.zip
chromium_src-bd1ad684dee1355226c5f6946034369b98186a55.tar.gz
chromium_src-bd1ad684dee1355226c5f6946034369b98186a55.tar.bz2
GTK: Add download shelf first show animation.
http://crbug.com/8631 Review URL: http://codereview.chromium.org/113428 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16196 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/platform_util.h5
-rw-r--r--chrome/common/platform_util_linux.cc4
-rw-r--r--chrome/common/platform_util_mac.mm5
-rw-r--r--chrome/common/platform_util_win.cc5
4 files changed, 19 insertions, 0 deletions
diff --git a/chrome/common/platform_util.h b/chrome/common/platform_util.h
index bb10140..c4a46b7 100644
--- a/chrome/common/platform_util.h
+++ b/chrome/common/platform_util.h
@@ -24,6 +24,11 @@ string16 GetWindowTitle(gfx::NativeWindow window);
// Returns true if |window| is the foreground top level window.
bool IsWindowActive(gfx::NativeWindow window);
+// Returns true if the view is visible. The exact definition of this is
+// platform-specific, but it is generally not "visible to the user", rather
+// whether the view has the visible attribute set.
+bool IsVisible(gfx::NativeView view);
+
}
#endif // CHROME_COMMON_PLATFORM_UTIL_H_
diff --git a/chrome/common/platform_util_linux.cc b/chrome/common/platform_util_linux.cc
index 3fd033f..7458978 100644
--- a/chrome/common/platform_util_linux.cc
+++ b/chrome/common/platform_util_linux.cc
@@ -41,4 +41,8 @@ bool IsWindowActive(gfx::NativeWindow window) {
return gtk_window_is_active(window);
}
+bool IsVisible(gfx::NativeView view) {
+ return GTK_WIDGET_VISIBLE(view);
+}
+
} // namespace platform_util
diff --git a/chrome/common/platform_util_mac.mm b/chrome/common/platform_util_mac.mm
index a75ea4b..2586d1f 100644
--- a/chrome/common/platform_util_mac.mm
+++ b/chrome/common/platform_util_mac.mm
@@ -44,4 +44,9 @@ bool IsWindowActive(gfx::NativeWindow window) {
return false;
}
+bool IsVisible(gfx::NativeView view) {
+ NOTIMPLEMENTED();
+ return true;
+}
+
} // namespace platform_util
diff --git a/chrome/common/platform_util_win.cc b/chrome/common/platform_util_win.cc
index e0ee665..f1af709 100644
--- a/chrome/common/platform_util_win.cc
+++ b/chrome/common/platform_util_win.cc
@@ -97,4 +97,9 @@ bool IsWindowActive(gfx::NativeWindow window) {
return ::GetForegroundWindow() == window;
}
+bool IsVisible(gfx::NativeView view) {
+ // MSVC complains if we don't include != 0.
+ return ::IsWindowVisible(view) != 0;
+}
+
} // namespace platform_util