OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <htiframe.h> | 5 #include <htiframe.h> |
6 #include <mshtml.h> | 6 #include <mshtml.h> |
7 #include <shlobj.h> | 7 #include <shlobj.h> |
8 #include <wininet.h> | 8 #include <wininet.h> |
9 | 9 |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
850 if (!parsed_url.has_ref()) | 850 if (!parsed_url.has_ref()) |
851 return moniker_url; | 851 return moniker_url; |
852 | 852 |
853 if (StartsWith(bho_url, moniker_url, false) && | 853 if (StartsWith(bho_url, moniker_url, false) && |
854 bho_url[moniker_url.length()] == L'#') | 854 bho_url[moniker_url.length()] == L'#') |
855 return bho_url; | 855 return bho_url; |
856 | 856 |
857 return moniker_url; | 857 return moniker_url; |
858 } | 858 } |
859 | 859 |
| 860 bool IsTopLevelWindow(HWND window) { |
| 861 long style = GetWindowLong(window, GWL_STYLE); // NOLINT |
| 862 if (!(style & WS_CHILD)) |
| 863 return true; |
| 864 |
| 865 HWND parent = GetParent(window); |
| 866 return !parent || (parent == GetDesktopWindow()); |
| 867 } |
OLD | NEW |