| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <objbase.h> | 9 #include <objbase.h> |
| 10 | 10 |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 bool pref_is_client); | 141 bool pref_is_client); |
| 142 | 142 |
| 143 // Returns true if edge |edge| (one of ABE_LEFT, TOP, RIGHT, or BOTTOM) of | 143 // Returns true if edge |edge| (one of ABE_LEFT, TOP, RIGHT, or BOTTOM) of |
| 144 // monitor |monitor| has an auto-hiding taskbar that's always-on-top. | 144 // monitor |monitor| has an auto-hiding taskbar that's always-on-top. |
| 145 bool EdgeHasTopmostAutoHideTaskbar(UINT edge, HMONITOR monitor); | 145 bool EdgeHasTopmostAutoHideTaskbar(UINT edge, HMONITOR monitor); |
| 146 | 146 |
| 147 // Duplicates a section handle from another process to the current process. | 147 // Duplicates a section handle from another process to the current process. |
| 148 // Returns the new valid handle if the function succeed. NULL otherwise. | 148 // Returns the new valid handle if the function succeed. NULL otherwise. |
| 149 HANDLE GetSectionFromProcess(HANDLE section, HANDLE process, bool read_only); | 149 HANDLE GetSectionFromProcess(HANDLE section, HANDLE process, bool read_only); |
| 150 | 150 |
| 151 // Duplicates a section handle from the current process for use in another |
| 152 // process. Returns the new valid handle or NULL on failure. |
| 153 HANDLE GetSectionForProcess(HANDLE section, HANDLE process, bool read_only); |
| 154 |
| 151 // Returns true if the specified window is the current active top window or one | 155 // Returns true if the specified window is the current active top window or one |
| 152 // of its children. | 156 // of its children. |
| 153 bool DoesWindowBelongToActiveWindow(HWND window); | 157 bool DoesWindowBelongToActiveWindow(HWND window); |
| 154 | 158 |
| 155 // Adjusts the value of |child_rect| if necessary to ensure that it is | 159 // Adjusts the value of |child_rect| if necessary to ensure that it is |
| 156 // completely visible within |parent_rect|. | 160 // completely visible within |parent_rect|. |
| 157 void EnsureRectIsVisibleInRect(const gfx::Rect& parent_rect, | 161 void EnsureRectIsVisibleInRect(const gfx::Rect& parent_rect, |
| 158 gfx::Rect* child_rect, | 162 gfx::Rect* child_rect, |
| 159 int padding); | 163 int padding); |
| 160 | 164 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 extern const int kAutoHideTaskbarThicknessPx; | 215 extern const int kAutoHideTaskbarThicknessPx; |
| 212 | 216 |
| 213 // Sets the application id given as the Application Model ID for the window | 217 // Sets the application id given as the Application Model ID for the window |
| 214 // specified. This method is used to insure that different web applications | 218 // specified. This method is used to insure that different web applications |
| 215 // do not group together on the Win7 task bar. | 219 // do not group together on the Win7 task bar. |
| 216 void SetAppIdForWindow(const std::wstring& app_id, HWND hwnd); | 220 void SetAppIdForWindow(const std::wstring& app_id, HWND hwnd); |
| 217 | 221 |
| 218 } // namespace win_util | 222 } // namespace win_util |
| 219 | 223 |
| 220 #endif // APP_WIN_UTIL_H_ | 224 #endif // APP_WIN_UTIL_H_ |
| OLD | NEW |