OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-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 #ifndef APP_WIN_UTIL_H_ | 5 #ifndef APP_WIN_UTIL_H_ |
6 #define APP_WIN_UTIL_H_ | 6 #define APP_WIN_UTIL_H_ |
7 | 7 |
8 #include <objbase.h> | 8 #include <objbase.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "app/gfx/font.h" | 13 #include "app/gfx/font.h" |
14 #include "base/fix_wp64.h" | 14 #include "base/fix_wp64.h" |
15 #include "base/gfx/rect.h" | 15 #include "base/gfx/rect.h" |
16 #include "base/scoped_handle.h" | 16 #include "base/scoped_handle.h" |
17 | 17 |
18 class FilePath; | 18 class FilePath; |
19 | 19 |
20 namespace win_util { | 20 namespace win_util { |
21 | 21 |
22 // Import ScopedHandle and friends into this namespace for backwards | 22 // Import ScopedHandle and friends into this namespace for backwards |
23 // compatibility. TODO(darin): clean this up! | 23 // compatibility. TODO(darin): clean this up! |
24 using ::ScopedHandle; | 24 using ::ScopedHandle; |
25 using ::ScopedFindFileHandle; | 25 using ::ScopedFindFileHandle; |
26 using ::ScopedHDC; | 26 using ::ScopedHDC; |
27 using ::ScopedBitmap; | 27 using ::ScopedBitmap; |
28 using ::ScopedHRGN; | |
29 | 28 |
30 // Simple scoped memory releaser class for COM allocated memory. | 29 // Simple scoped memory releaser class for COM allocated memory. |
31 // Example: | 30 // Example: |
32 // CoMemReleaser<ITEMIDLIST> file_item; | 31 // CoMemReleaser<ITEMIDLIST> file_item; |
33 // SHGetSomeInfo(&file_item, ...); | 32 // SHGetSomeInfo(&file_item, ...); |
34 // ... | 33 // ... |
35 // return; <-- memory released | 34 // return; <-- memory released |
36 template<typename T> | 35 template<typename T> |
37 class CoMemReleaser { | 36 class CoMemReleaser { |
38 public: | 37 public: |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 extern const int kAutoHideTaskbarThicknessPx; | 288 extern const int kAutoHideTaskbarThicknessPx; |
290 | 289 |
291 // Sets the application id given as the Application Model ID for the window | 290 // Sets the application id given as the Application Model ID for the window |
292 // specified. This method is used to insure that different web applications | 291 // specified. This method is used to insure that different web applications |
293 // do not group together on the Win7 task bar. | 292 // do not group together on the Win7 task bar. |
294 void SetAppIdForWindow(const std::wstring& app_id, HWND hwnd); | 293 void SetAppIdForWindow(const std::wstring& app_id, HWND hwnd); |
295 | 294 |
296 } // namespace win_util | 295 } // namespace win_util |
297 | 296 |
298 #endif // APP_WIN_UTIL_H_ | 297 #endif // APP_WIN_UTIL_H_ |
OLD | NEW |