| 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 "base/logging.h" | 5 #include "base/logging.h" |
| 6 #include "webkit/glue/plugins/fake_plugin_window_tracker_mac.h" | 6 #include "webkit/glue/plugins/fake_plugin_window_tracker_mac.h" |
| 7 | 7 |
| 8 FakePluginWindowTracker::FakePluginWindowTracker() | 8 FakePluginWindowTracker::FakePluginWindowTracker() |
| 9 : window_to_delegate_map_(CFDictionaryCreateMutable(kCFAllocatorDefault, | 9 : window_to_delegate_map_(CFDictionaryCreateMutable(kCFAllocatorDefault, |
| 10 0, NULL, NULL)) { | 10 0, NULL, NULL)) { |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 CFDictionaryGetValue(window_to_delegate_map_, window)); | 40 CFDictionaryGetValue(window_to_delegate_map_, window)); |
| 41 } | 41 } |
| 42 | 42 |
| 43 void FakePluginWindowTracker::RemoveFakeWindowForDelegate( | 43 void FakePluginWindowTracker::RemoveFakeWindowForDelegate( |
| 44 WebPluginDelegateImpl* delegate, WindowRef window) { | 44 WebPluginDelegateImpl* delegate, WindowRef window) { |
| 45 DCHECK(GetDelegateForFakeWindow(window) == delegate); | 45 DCHECK(GetDelegateForFakeWindow(window) == delegate); |
| 46 CFDictionaryRemoveValue(window_to_delegate_map_, delegate); | 46 CFDictionaryRemoveValue(window_to_delegate_map_, delegate); |
| 47 if (window) // Check just in case the initial window creation failed. | 47 if (window) // Check just in case the initial window creation failed. |
| 48 DisposeWindow(window); | 48 DisposeWindow(window); |
| 49 } | 49 } |
| OLD | NEW |