| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/base/win/shell.h" | 5 #include "ui/base/win/shell.h" |
| 6 | 6 |
| 7 #include <dwmapi.h> |
| 7 #include <shellapi.h> | 8 #include <shellapi.h> |
| 8 #include <shlobj.h> // Must be before propkey. | 9 #include <shlobj.h> // Must be before propkey. |
| 9 #include <propkey.h> | 10 #include <propkey.h> |
| 10 | 11 |
| 11 #include "base/file_path.h" | 12 #include "base/file_path.h" |
| 12 #include "base/native_library.h" | 13 #include "base/native_library.h" |
| 13 #include "base/string_util.h" | 14 #include "base/string_util.h" |
| 14 #include "base/win/metro.h" | 15 #include "base/win/metro.h" |
| 15 #include "base/win/scoped_comptr.h" | 16 #include "base/win/scoped_comptr.h" |
| 16 #include "base/win/win_util.h" | 17 #include "base/win/win_util.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 } | 82 } |
| 82 | 83 |
| 83 void SetAppIdForWindow(const string16& app_id, HWND hwnd) { | 84 void SetAppIdForWindow(const string16& app_id, HWND hwnd) { |
| 84 SetAppIdAndIconForWindow(app_id, string16(), hwnd); | 85 SetAppIdAndIconForWindow(app_id, string16(), hwnd); |
| 85 } | 86 } |
| 86 | 87 |
| 87 void SetAppIconForWindow(const string16& app_icon, HWND hwnd) { | 88 void SetAppIconForWindow(const string16& app_icon, HWND hwnd) { |
| 88 SetAppIdAndIconForWindow(string16(), app_icon, hwnd); | 89 SetAppIdAndIconForWindow(string16(), app_icon, hwnd); |
| 89 } | 90 } |
| 90 | 91 |
| 92 bool IsAeroGlassEnabled() { |
| 93 if (base::win::GetVersion() < base::win::VERSION_VISTA) |
| 94 return false; |
| 95 // If composition is not enabled, we behave like on XP. |
| 96 BOOL enabled = FALSE; |
| 97 return SUCCEEDED(DwmIsCompositionEnabled(&enabled)) && enabled; |
| 98 } |
| 99 |
| 91 } // namespace win | 100 } // namespace win |
| 92 } // namespace ui | 101 } // namespace ui |
| OLD | NEW |