Chromium Code Reviews| 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 #include "chrome/browser/renderer_host/accelerated_surface_container_manager_mac .h" | 5 #include "chrome/browser/renderer_host/accelerated_surface_container_manager_mac .h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "chrome/browser/renderer_host/accelerated_surface_container_mac.h" | 8 #include "chrome/browser/renderer_host/accelerated_surface_container_mac.h" |
| 9 #include "webkit/plugins/npapi/webplugin.h" | 9 #include "webkit/plugins/npapi/webplugin.h" |
| 10 | 10 |
| 11 AcceleratedSurfaceContainerManagerMac::AcceleratedSurfaceContainerManagerMac() | 11 AcceleratedSurfaceContainerManagerMac::AcceleratedSurfaceContainerManagerMac() |
| 12 : current_id_(0), | 12 : current_id_(0), |
| 13 root_container_(NULL), | 13 root_container_(NULL), |
| 14 root_container_handle_(gfx::kNullPluginWindow), | 14 root_container_handle_(gfx::kNullPluginWindow), |
| 15 gpu_rendering_active_(false) { | 15 gpu_rendering_active_(false) { |
| 16 } | 16 } |
| 17 | 17 |
| 18 AcceleratedSurfaceContainerManagerMac:: | |
| 19 ~AcceleratedSurfaceContainerManagerMac() {} | |
|
Nico
2011/02/18 23:35:11
indent 4?
| |
| 20 | |
| 18 gfx::PluginWindowHandle | 21 gfx::PluginWindowHandle |
| 19 AcceleratedSurfaceContainerManagerMac::AllocateFakePluginWindowHandle( | 22 AcceleratedSurfaceContainerManagerMac::AllocateFakePluginWindowHandle( |
| 20 bool opaque, bool root) { | 23 bool opaque, bool root) { |
| 21 base::AutoLock lock(lock_); | 24 base::AutoLock lock(lock_); |
| 22 | 25 |
| 23 AcceleratedSurfaceContainerMac* container = | 26 AcceleratedSurfaceContainerMac* container = |
| 24 new AcceleratedSurfaceContainerMac(this, opaque); | 27 new AcceleratedSurfaceContainerMac(this, opaque); |
| 25 gfx::PluginWindowHandle res = | 28 gfx::PluginWindowHandle res = |
| 26 static_cast<gfx::PluginWindowHandle>(++current_id_); | 29 static_cast<gfx::PluginWindowHandle>(++current_id_); |
| 27 plugin_window_to_container_map_.insert(std::make_pair(res, container)); | 30 plugin_window_to_container_map_.insert(std::make_pair(res, container)); |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 164 gfx::PluginWindowHandle id) const { | 167 gfx::PluginWindowHandle id) const { |
| 165 PluginWindowToContainerMap::const_iterator i = | 168 PluginWindowToContainerMap::const_iterator i = |
| 166 plugin_window_to_container_map_.find(id); | 169 plugin_window_to_container_map_.find(id); |
| 167 if (i != plugin_window_to_container_map_.end()) | 170 if (i != plugin_window_to_container_map_.end()) |
| 168 return i->second; | 171 return i->second; |
| 169 | 172 |
| 170 LOG(ERROR) << "Request for plugin container for unknown window id " << id; | 173 LOG(ERROR) << "Request for plugin container for unknown window id " << id; |
| 171 | 174 |
| 172 return NULL; | 175 return NULL; |
| 173 } | 176 } |
| OLD | NEW |