OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_FRAME_INFOBARS_INTERNAL_DISPLACED_WINDOW_MANAGER_H_ | 5 #ifndef CHROME_FRAME_INFOBARS_INTERNAL_DISPLACED_WINDOW_MANAGER_H_ |
6 #define CHROME_FRAME_INFOBARS_INTERNAL_DISPLACED_WINDOW_MANAGER_H_ | 6 #define CHROME_FRAME_INFOBARS_INTERNAL_DISPLACED_WINDOW_MANAGER_H_ |
7 | 7 |
8 #include <atlbase.h> | 8 #include <atlbase.h> |
9 #include <atlcrack.h> | 9 #include <atlcrack.h> |
10 #include <atlwin.h> | 10 #include <atlwin.h> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/win/atlcheck.h" |
13 #include "chrome_frame/infobars/internal/subclassing_window_with_delegate.h" | 14 #include "chrome_frame/infobars/internal/subclassing_window_with_delegate.h" |
14 | 15 |
15 // DisplacedWindowManager observes the HWND passed to Initialize and: | 16 // DisplacedWindowManager observes the HWND passed to Initialize and: |
16 // 1) Intercepts NCCALCSIZE events allowing the client to modify the window's | 17 // 1) Intercepts NCCALCSIZE events allowing the client to modify the window's |
17 // requested dimensions. | 18 // requested dimensions. |
18 // 2) Allows the client to request a recalculation of the window's dimensions | 19 // 2) Allows the client to request a recalculation of the window's dimensions |
19 // (resulting in a deferred callback as in [1]). | 20 // (resulting in a deferred callback as in [1]). |
20 // 3) Is destroyed only when the window is destroyed. | 21 // 3) Is destroyed only when the window is destroyed. |
21 class DisplacedWindowManager | 22 class DisplacedWindowManager |
22 : public SubclassingWindowWithDelegate<DisplacedWindowManager> { | 23 : public SubclassingWindowWithDelegate<DisplacedWindowManager> { |
(...skipping 13 matching lines...) Expand all Loading... |
36 private: | 37 private: |
37 // The size of the displaced window is being calculated. Allow | 38 // The size of the displaced window is being calculated. Allow |
38 // InfobarWindows to reserve a part of the space for themselves, if they are | 39 // InfobarWindows to reserve a part of the space for themselves, if they are |
39 // visible. | 40 // visible. |
40 LRESULT OnNcCalcSize(BOOL calc_valid_rects, LPARAM lparam); | 41 LRESULT OnNcCalcSize(BOOL calc_valid_rects, LPARAM lparam); |
41 | 42 |
42 DISALLOW_COPY_AND_ASSIGN(DisplacedWindowManager); | 43 DISALLOW_COPY_AND_ASSIGN(DisplacedWindowManager); |
43 }; // class DisplacedWindowManager | 44 }; // class DisplacedWindowManager |
44 | 45 |
45 #endif // CHROME_FRAME_INFOBARS_INTERNAL_DISPLACED_WINDOW_MANAGER_H_ | 46 #endif // CHROME_FRAME_INFOBARS_INTERNAL_DISPLACED_WINDOW_MANAGER_H_ |
OLD | NEW |