| 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 "chrome/plugin/webplugin_proxy.h" | 5 #include "chrome/plugin/webplugin_proxy.h" |
| 6 | 6 |
| 7 #include "app/gfx/canvas.h" | 7 #include "app/gfx/canvas.h" |
| 8 #if defined(OS_WIN) | 8 #if defined(OS_WIN) |
| 9 #include "app/win_util.h" | 9 #include "app/win_util.h" |
| 10 #endif | 10 #endif |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 return cp_browsing_context_; | 236 return cp_browsing_context_; |
| 237 } | 237 } |
| 238 | 238 |
| 239 WebPluginProxy* WebPluginProxy::FromCPBrowsingContext( | 239 WebPluginProxy* WebPluginProxy::FromCPBrowsingContext( |
| 240 CPBrowsingContext context) { | 240 CPBrowsingContext context) { |
| 241 return GetContextMap()[context]; | 241 return GetContextMap()[context]; |
| 242 } | 242 } |
| 243 | 243 |
| 244 WebPluginResourceClient* WebPluginProxy::GetResourceClient(int id) { | 244 WebPluginResourceClient* WebPluginProxy::GetResourceClient(int id) { |
| 245 ResourceClientMap::iterator iterator = resource_clients_.find(id); | 245 ResourceClientMap::iterator iterator = resource_clients_.find(id); |
| 246 // The IPC messages which deal with streams are now asynchronous. It is |
| 247 // now possible to receive stream messages from the renderer for streams |
| 248 // which may have been cancelled by the plugin. |
| 246 if (iterator == resource_clients_.end()) { | 249 if (iterator == resource_clients_.end()) { |
| 247 NOTREACHED(); | |
| 248 return NULL; | 250 return NULL; |
| 249 } | 251 } |
| 250 | 252 |
| 251 return iterator->second; | 253 return iterator->second; |
| 252 } | 254 } |
| 253 | 255 |
| 254 int WebPluginProxy::GetRendererProcessId() { | 256 int WebPluginProxy::GetRendererProcessId() { |
| 255 if (channel_.get()) | 257 if (channel_.get()) |
| 256 return channel_->peer_pid(); | 258 return channel_->peer_pid(); |
| 257 return 0; | 259 return 0; |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 626 while (index != resource_clients_.end()) { | 628 while (index != resource_clients_.end()) { |
| 627 WebPluginResourceClient* client = (*index).second; | 629 WebPluginResourceClient* client = (*index).second; |
| 628 | 630 |
| 629 if (client == resource_client) { | 631 if (client == resource_client) { |
| 630 resource_clients_.erase(index++); | 632 resource_clients_.erase(index++); |
| 631 } else { | 633 } else { |
| 632 index++; | 634 index++; |
| 633 } | 635 } |
| 634 } | 636 } |
| 635 } | 637 } |
| OLD | NEW |