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 #if !defined(__LP64__) | 5 #if !defined(__LP64__) |
6 | 6 |
7 #include <Carbon/Carbon.h> | 7 #include <Carbon/Carbon.h> |
8 | 8 |
9 #include "content/plugin/plugin_interpose_util_mac.h" | 9 #include "content/plugin/plugin_interpose_util_mac.h" |
10 #include "ui/gfx/rect.h" | 10 #include "ui/gfx/rect.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 static CGRect CGRectForWindow(WindowRef window) { | 22 static CGRect CGRectForWindow(WindowRef window) { |
23 CGRect bounds = { { 0, 0 }, { 0, 0 } }; | 23 CGRect bounds = { { 0, 0 }, { 0, 0 } }; |
24 HIWindowGetBounds(window, kWindowContentRgn, kHICoordSpace72DPIGlobal, | 24 HIWindowGetBounds(window, kWindowContentRgn, kHICoordSpace72DPIGlobal, |
25 &bounds); | 25 &bounds); |
26 return bounds; | 26 return bounds; |
27 } | 27 } |
28 | 28 |
29 struct WindowInfo { | 29 struct WindowInfo { |
30 uint32 window_id; | 30 uint32 window_id; |
31 CGRect bounds; | 31 CGRect bounds; |
32 WindowInfo(WindowRef window) { | 32 explicit WindowInfo(WindowRef window) { |
33 window_id = HIWindowGetCGWindowID(window); | 33 window_id = HIWindowGetCGWindowID(window); |
34 bounds = CGRectForWindow(window); | 34 bounds = CGRectForWindow(window); |
35 } | 35 } |
36 }; | 36 }; |
37 | 37 |
38 static void OnPluginWindowClosed(const WindowInfo& window_info) { | 38 static void OnPluginWindowClosed(const WindowInfo& window_info) { |
39 mac_plugin_interposing::NotifyBrowserOfPluginHideWindow(window_info.window_id, | 39 mac_plugin_interposing::NotifyBrowserOfPluginHideWindow(window_info.window_id, |
40 window_info.bounds); | 40 window_info.bounds); |
41 } | 41 } |
42 | 42 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 INTERPOSE_FUNCTION(SelectWindow), | 119 INTERPOSE_FUNCTION(SelectWindow), |
120 INTERPOSE_FUNCTION(ShowWindow), | 120 INTERPOSE_FUNCTION(ShowWindow), |
121 INTERPOSE_FUNCTION(ShowHide), | 121 INTERPOSE_FUNCTION(ShowHide), |
122 INTERPOSE_FUNCTION(DisposeWindow), | 122 INTERPOSE_FUNCTION(DisposeWindow), |
123 INTERPOSE_FUNCTION(HideWindow), | 123 INTERPOSE_FUNCTION(HideWindow), |
124 INTERPOSE_FUNCTION(ReleaseWindow), | 124 INTERPOSE_FUNCTION(ReleaseWindow), |
125 INTERPOSE_FUNCTION(DisposeDialog), | 125 INTERPOSE_FUNCTION(DisposeDialog), |
126 }; | 126 }; |
127 | 127 |
128 #endif // !__LP64__ | 128 #endif // !__LP64__ |
OLD | NEW |