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

Side by Side Diff: ui/base/win/hwnd_util.h

Issue 9426006: Merge 121180 - views / Windows: A child window should be centered with respect to its parent, not t… (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1025/src/
Patch Set: Created 8 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ui/base/win/hwnd_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 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 #ifndef UI_BASE_WIN_HWND_UTIL_H_ 5 #ifndef UI_BASE_WIN_HWND_UTIL_H_
6 #define UI_BASE_WIN_HWND_UTIL_H_ 6 #define UI_BASE_WIN_HWND_UTIL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <windows.h> 9 #include <windows.h>
10 10
11 #include "base/string16.h" 11 #include "base/string16.h"
(...skipping 14 matching lines...) Expand all
26 26
27 // Pointer-friendly wrappers around Get/SetWindowLong(..., GWLP_USERDATA, ...) 27 // Pointer-friendly wrappers around Get/SetWindowLong(..., GWLP_USERDATA, ...)
28 // Returns the previously set value. 28 // Returns the previously set value.
29 UI_EXPORT void* SetWindowUserData(HWND hwnd, void* user_data); 29 UI_EXPORT void* SetWindowUserData(HWND hwnd, void* user_data);
30 UI_EXPORT void* GetWindowUserData(HWND hwnd); 30 UI_EXPORT void* GetWindowUserData(HWND hwnd);
31 31
32 // Returns true if the specified window is the current active top window or one 32 // Returns true if the specified window is the current active top window or one
33 // of its children. 33 // of its children.
34 UI_EXPORT bool DoesWindowBelongToActiveWindow(HWND window); 34 UI_EXPORT bool DoesWindowBelongToActiveWindow(HWND window);
35 35
36 // Sizes the window to have a client or window size (depending on the value of 36 // Sizes the window to have a window size of |pref|, then centers the window
37 // |pref_is_client|) of pref, then centers the window over parent, ensuring the 37 // over |parent|, ensuring the window fits on screen.
38 // window fits on screen.
39 UI_EXPORT void CenterAndSizeWindow(HWND parent, 38 UI_EXPORT void CenterAndSizeWindow(HWND parent,
40 HWND window, 39 HWND window,
41 const gfx::Size& pref, 40 const gfx::Size& pref);
42 bool pref_is_client);
43 41
44 // If |hwnd| is NULL logs various thing and CHECKs. Invoke right after calling 42 // If |hwnd| is NULL logs various thing and CHECKs. Invoke right after calling
45 // CreateWindow. 43 // CreateWindow.
46 UI_EXPORT void CheckWindowCreated(HWND hwnd); 44 UI_EXPORT void CheckWindowCreated(HWND hwnd);
47 45
48 // Shows the system menu for |window| and sends the selected command (if the 46 // Shows the system menu for |window| and sends the selected command (if the
49 // user selected something. 47 // user selected something.
50 UI_EXPORT void ShowSystemMenu(HWND window, int screen_x, int screen_y); 48 UI_EXPORT void ShowSystemMenu(HWND window, int screen_x, int screen_y);
51 49
52 } // namespace ui 50 } // namespace ui
53 51
54 #endif // UI_BASE_WIN_HWND_UTIL_H_ 52 #endif // UI_BASE_WIN_HWND_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | ui/base/win/hwnd_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698