summaryrefslogtreecommitdiffstats
path: root/chrome/common/platform_util_win.cc
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-14 23:15:47 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-14 23:15:47 +0000
commit3753f52d42975eaefcafca9fc0257ec24e161a9c (patch)
treec9622baf613dd1b47c304d30e1ded74fa84fce54 /chrome/common/platform_util_win.cc
parent9e23bb1bba29dad5305e8f8a08341aefe7275502 (diff)
downloadchromium_src-3753f52d42975eaefcafca9fc0257ec24e161a9c.zip
chromium_src-3753f52d42975eaefcafca9fc0257ec24e161a9c.tar.gz
chromium_src-3753f52d42975eaefcafca9fc0257ec24e161a9c.tar.bz2
Implement chrome_proces_util for linux and enable download ui test.
To get the PID from the socket, we use lsof (fuser doesn't work with unix sockets apparently). The download shelf, save page, and browser ui tests now pass. Review URL: http://codereview.chromium.org/66071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13716 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/platform_util_win.cc')
-rw-r--r--chrome/common/platform_util_win.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/common/platform_util_win.cc b/chrome/common/platform_util_win.cc
index 16ea8c0..1925122 100644
--- a/chrome/common/platform_util_win.cc
+++ b/chrome/common/platform_util_win.cc
@@ -15,6 +15,7 @@
#include "base/file_util.h"
#include "base/gfx/native_widget_types.h"
#include "base/logging.h"
+#include "base/string_util.h"
#include "chrome/common/win_util.h"
namespace platform_util {
@@ -85,4 +86,11 @@ gfx::NativeWindow GetTopLevel(gfx::NativeView view) {
return GetAncestor(view, GA_ROOT);
}
+string16 GetWindowTitle(gfx::NativeWindow window_handle) {
+ std::wstring result;
+ int length = ::GetWindowTextLength(window_handle) + 1;
+ ::GetWindowText(window_handle, WriteInto(&result, length), length);
+ return WideToUTF16(result);
+}
+
} // namespace platform_util