Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1421)

Unified Diff: app/win/window_impl.cc

Issue 2124009: Fix a crasher with "select file" dialogs. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Merge Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « app/win/window_impl.h ('k') | views/widget/widget_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: app/win/window_impl.cc
diff --git a/app/win/window_impl.cc b/app/win/window_impl.cc
index 9668f82ea88bd3157e29fc9b69a37129a5a274ee..54884344f42a75903ef5fa7492324e258411f8c6 100644
--- a/app/win/window_impl.cc
+++ b/app/win/window_impl.cc
@@ -152,6 +152,16 @@ HICON WindowImpl::GetDefaultWindowIcon() const {
return NULL;
}
+// static
+bool WindowImpl::IsWindowImpl(HWND hwnd) {
+ wchar_t tmp[128];
+ if (!::GetClassName(hwnd, tmp, 128))
+ return false;
+
+ std::wstring class_name(tmp);
+ return class_name.find(kBaseClassName) == 0;
+}
+
LRESULT WindowImpl::OnWndProc(UINT message, WPARAM w_param, LPARAM l_param) {
LRESULT result = 0;
« no previous file with comments | « app/win/window_impl.h ('k') | views/widget/widget_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698