Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2204)

Unified Diff: content/renderer/pepper/pepper_plugin_delegate_impl.cc

Issue 10458008: Support mouse lock in Flash fullscreen mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/pepper/pepper_plugin_delegate_impl.h ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/pepper_plugin_delegate_impl.cc
diff --git a/content/renderer/pepper/pepper_plugin_delegate_impl.cc b/content/renderer/pepper/pepper_plugin_delegate_impl.cc
index 630dc78cb5c97abab520940be4c443eb15ec0b84..c1ca266fa8cb0650a5cc01bdf3463e94c411695e 100644
--- a/content/renderer/pepper/pepper_plugin_delegate_impl.cc
+++ b/content/renderer/pepper/pepper_plugin_delegate_impl.cc
@@ -1363,20 +1363,19 @@ ppapi::Preferences PepperPluginDelegateImpl::GetPreferences() {
bool PepperPluginDelegateImpl::LockMouse(
webkit::ppapi::PluginInstance* instance) {
-
- return render_view_->mouse_lock_dispatcher()->LockMouse(
+ return GetMouseLockDispatcher(instance)->LockMouse(
GetOrCreateLockTargetAdapter(instance));
}
void PepperPluginDelegateImpl::UnlockMouse(
webkit::ppapi::PluginInstance* instance) {
- render_view_->mouse_lock_dispatcher()->UnlockMouse(
+ GetMouseLockDispatcher(instance)->UnlockMouse(
GetOrCreateLockTargetAdapter(instance));
}
bool PepperPluginDelegateImpl::IsMouseLocked(
webkit::ppapi::PluginInstance* instance) {
- return render_view_->mouse_lock_dispatcher()->IsMouseLockedTo(
+ return GetMouseLockDispatcher(instance)->IsMouseLockedTo(
GetOrCreateLockTargetAdapter(instance));
}
@@ -1679,12 +1678,20 @@ void PepperPluginDelegateImpl::UnSetAndDeleteLockTargetAdapter(
LockTargetMap::iterator it = mouse_lock_instances_.find(instance);
if (it != mouse_lock_instances_.end()) {
MouseLockDispatcher::LockTarget* target = it->second;
- render_view_->mouse_lock_dispatcher()->OnLockTargetDestroyed(target);
+ GetMouseLockDispatcher(instance)->OnLockTargetDestroyed(target);
delete target;
mouse_lock_instances_.erase(it);
}
}
+MouseLockDispatcher* PepperPluginDelegateImpl::GetMouseLockDispatcher(
+ webkit::ppapi::PluginInstance* instance) {
+ if (instance->flash_fullscreen())
+ return instance->fullscreen_container()->GetMouseLockDispatcher();
+ else
+ return render_view_->mouse_lock_dispatcher();
+}
+
webkit_glue::ClipboardClient*
PepperPluginDelegateImpl::CreateClipboardClient() const {
return new RendererClipboardClient;
« no previous file with comments | « content/renderer/pepper/pepper_plugin_delegate_impl.h ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698