| 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 #include "webkit/plugins/npapi/carbon_plugin_window_tracker_mac.h" |
| 6 |
| 5 #include "base/logging.h" | 7 #include "base/logging.h" |
| 6 #include "webkit/glue/plugins/carbon_plugin_window_tracker_mac.h" | 8 |
| 9 namespace webkit { |
| 10 namespace npapi { |
| 7 | 11 |
| 8 CarbonPluginWindowTracker::CarbonPluginWindowTracker() { | 12 CarbonPluginWindowTracker::CarbonPluginWindowTracker() { |
| 9 } | 13 } |
| 10 | 14 |
| 11 CarbonPluginWindowTracker* CarbonPluginWindowTracker::SharedInstance() { | 15 CarbonPluginWindowTracker* CarbonPluginWindowTracker::SharedInstance() { |
| 12 static CarbonPluginWindowTracker* tracker = new CarbonPluginWindowTracker(); | 16 static CarbonPluginWindowTracker* tracker = new CarbonPluginWindowTracker(); |
| 13 return tracker; | 17 return tracker; |
| 14 } | 18 } |
| 15 | 19 |
| 16 WindowRef CarbonPluginWindowTracker::CreateDummyWindowForDelegate( | 20 WindowRef CarbonPluginWindowTracker::CreateDummyWindowForDelegate( |
| (...skipping 29 matching lines...) Expand all Loading... |
| 46 } | 50 } |
| 47 | 51 |
| 48 void CarbonPluginWindowTracker::DestroyDummyWindowForDelegate( | 52 void CarbonPluginWindowTracker::DestroyDummyWindowForDelegate( |
| 49 OpaquePluginRef delegate, WindowRef window) { | 53 OpaquePluginRef delegate, WindowRef window) { |
| 50 DCHECK(GetDelegateForDummyWindow(window) == delegate); | 54 DCHECK(GetDelegateForDummyWindow(window) == delegate); |
| 51 window_to_delegate_map_.erase(window); | 55 window_to_delegate_map_.erase(window); |
| 52 delegate_to_window_map_.erase(delegate); | 56 delegate_to_window_map_.erase(delegate); |
| 53 if (window) // Check just in case the initial window creation failed. | 57 if (window) // Check just in case the initial window creation failed. |
| 54 DisposeWindow(window); | 58 DisposeWindow(window); |
| 55 } | 59 } |
| 60 |
| 61 } // namespace npapi |
| 62 } // namespace webkit |
| OLD | NEW |