OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "content/renderer/pepper_plugin_delegate_impl.h" | 5 #include "content/renderer/pepper_plugin_delegate_impl.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 #include <queue> | 8 #include <queue> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
727 active_instances_.begin(); | 727 active_instances_.begin(); |
728 i != active_instances_.end(); ++i) { | 728 i != active_instances_.end(); ++i) { |
729 webkit::ppapi::PluginInstance* instance = *i; | 729 webkit::ppapi::PluginInstance* instance = *i; |
730 if (instance->GetBitmapForOptimizedPluginPaint( | 730 if (instance->GetBitmapForOptimizedPluginPaint( |
731 paint_bounds, dib, location, clip)) | 731 paint_bounds, dib, location, clip)) |
732 return *i; | 732 return *i; |
733 } | 733 } |
734 return NULL; | 734 return NULL; |
735 } | 735 } |
736 | 736 |
| 737 void PepperPluginDelegateImpl::PluginFocusChanged(bool focused) { |
| 738 if (render_view_) |
| 739 render_view_->PpapiPluginFocusChanged(focused); |
| 740 } |
| 741 |
737 void PepperPluginDelegateImpl::PluginCrashed( | 742 void PepperPluginDelegateImpl::PluginCrashed( |
738 webkit::ppapi::PluginInstance* instance) { | 743 webkit::ppapi::PluginInstance* instance) { |
739 render_view_->PluginCrashed(instance->module()->path()); | 744 render_view_->PluginCrashed(instance->module()->path()); |
740 } | 745 } |
741 | 746 |
742 void PepperPluginDelegateImpl::InstanceCreated( | 747 void PepperPluginDelegateImpl::InstanceCreated( |
743 webkit::ppapi::PluginInstance* instance) { | 748 webkit::ppapi::PluginInstance* instance) { |
744 active_instances_.insert(instance); | 749 active_instances_.insert(instance); |
745 | 750 |
746 // Set the initial focus. | 751 // Set the initial focus. |
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1312 DLOG(WARNING) << "Browser allocation request message failed"; | 1317 DLOG(WARNING) << "Browser allocation request message failed"; |
1313 return NULL; | 1318 return NULL; |
1314 } | 1319 } |
1315 if (!base::SharedMemory::IsHandleValid(handle)) { | 1320 if (!base::SharedMemory::IsHandleValid(handle)) { |
1316 DLOG(WARNING) << "Browser failed to allocate shared memory"; | 1321 DLOG(WARNING) << "Browser failed to allocate shared memory"; |
1317 return NULL; | 1322 return NULL; |
1318 } | 1323 } |
1319 shm.reset(new base::SharedMemory(handle, false)); | 1324 shm.reset(new base::SharedMemory(handle, false)); |
1320 return shm.release(); | 1325 return shm.release(); |
1321 } | 1326 } |
OLD | NEW |