| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 WEBKIT_GLUE_PLUGINS_CARBON_PLUGIN_WINDOW_TRACKER_MAC_H_ | 5 #ifndef WEBKIT_PLUGINS_NPAPI_CARBON_PLUGIN_WINDOW_TRACKER_MAC_H_ |
| 6 #define WEBKIT_GLUE_PLUGINS_CARBON_PLUGIN_WINDOW_TRACKER_MAC_H_ | 6 #define WEBKIT_PLUGINS_NPAPI_CARBON_PLUGIN_WINDOW_TRACKER_MAC_H_ |
| 7 | 7 |
| 8 #include <Carbon/Carbon.h> | 8 #include <Carbon/Carbon.h> |
| 9 #include <map> | 9 #include <map> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 | 12 |
| 13 namespace webkit { |
| 14 namespace npapi { |
| 15 |
| 13 // This is really a WebPluginDelegateImpl, but that class is private to the | 16 // This is really a WebPluginDelegateImpl, but that class is private to the |
| 14 // framework, and these functions are called from a dylib. | 17 // framework, and these functions are called from a dylib. |
| 15 typedef void* OpaquePluginRef; | 18 typedef void* OpaquePluginRef; |
| 16 | 19 |
| 17 // Creates and tracks the invisible windows that are necessary for | 20 // Creates and tracks the invisible windows that are necessary for |
| 18 // Carbon-event-model plugins. | 21 // Carbon-event-model plugins. |
| 19 // | 22 // |
| 20 // Serves as a bridge between plugin delegate instances and the Carbon | 23 // Serves as a bridge between plugin delegate instances and the Carbon |
| 21 // interposing library. The Carbon functions we interpose work in terms of | 24 // interposing library. The Carbon functions we interpose work in terms of |
| 22 // WindowRefs, and we need to be able to map from those back to the plugin | 25 // WindowRefs, and we need to be able to map from those back to the plugin |
| (...skipping 20 matching lines...) Expand all Loading... |
| 43 | 46 |
| 44 private: | 47 private: |
| 45 typedef std::map<WindowRef, OpaquePluginRef> WindowToDelegateMap; | 48 typedef std::map<WindowRef, OpaquePluginRef> WindowToDelegateMap; |
| 46 typedef std::map<OpaquePluginRef, WindowRef> DelegateToWindowMap; | 49 typedef std::map<OpaquePluginRef, WindowRef> DelegateToWindowMap; |
| 47 WindowToDelegateMap window_to_delegate_map_; | 50 WindowToDelegateMap window_to_delegate_map_; |
| 48 DelegateToWindowMap delegate_to_window_map_; | 51 DelegateToWindowMap delegate_to_window_map_; |
| 49 | 52 |
| 50 DISALLOW_COPY_AND_ASSIGN(CarbonPluginWindowTracker); | 53 DISALLOW_COPY_AND_ASSIGN(CarbonPluginWindowTracker); |
| 51 }; | 54 }; |
| 52 | 55 |
| 53 #endif // WEBKIT_GLUE_PLUGINS_CARBON_PLUGIN_WINDOW_TRACKER_MAC_H_ | 56 } // namespace npapi |
| 57 } // namespace webkit |
| 58 |
| 59 #endif // WEBKIT_PLUGINS_NPAPI_CARBON_PLUGIN_WINDOW_TRACKER_MAC_H_ |
| OLD | NEW |