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

Side by Side Diff: content/browser/web_contents/web_contents_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, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browser/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 1232 matching lines...) Expand 10 before | Expand all | Expand 10 after
1243 1243
1244 RenderWidgetHostViewPort* widget_host_view = 1244 RenderWidgetHostViewPort* widget_host_view =
1245 RenderWidgetHostViewPort::FromRWHV(GetCreatedWidget(route_id)); 1245 RenderWidgetHostViewPort::FromRWHV(GetCreatedWidget(route_id));
1246 if (!widget_host_view) 1246 if (!widget_host_view)
1247 return; 1247 return;
1248 if (is_fullscreen) { 1248 if (is_fullscreen) {
1249 widget_host_view->InitAsFullscreen(GetRenderWidgetHostView()); 1249 widget_host_view->InitAsFullscreen(GetRenderWidgetHostView());
1250 } else { 1250 } else {
1251 widget_host_view->InitAsPopup(GetRenderWidgetHostView(), initial_pos); 1251 widget_host_view->InitAsPopup(GetRenderWidgetHostView(), initial_pos);
1252 } 1252 }
1253 RenderWidgetHostImpl::From(widget_host_view->GetRenderWidgetHost())->Init(); 1253
1254 RenderWidgetHostImpl* render_widget_host_impl =
1255 RenderWidgetHostImpl::From(widget_host_view->GetRenderWidgetHost());
1256 render_widget_host_impl->Init();
1257 // Only allow privileged mouse lock for fullscreen render widget, which is
1258 // used to implement Pepper Flash fullscreen.
1259 render_widget_host_impl->set_allow_privileged_mouse_lock(is_fullscreen);
1254 1260
1255 #if defined(OS_MACOSX) 1261 #if defined(OS_MACOSX)
1256 // A RenderWidgetHostViewMac has lifetime scoped to the view. Now that it's 1262 // A RenderWidgetHostViewMac has lifetime scoped to the view. Now that it's
1257 // properly embedded (or purposefully ignored) we can release the retain we 1263 // properly embedded (or purposefully ignored) we can release the retain we
1258 // took in CreateNewWidget(). 1264 // took in CreateNewWidget().
1259 base::mac::NSObjectRelease(widget_host_view->GetNativeView()); 1265 base::mac::NSObjectRelease(widget_host_view->GetNativeView());
1260 #endif 1266 #endif
1261 } 1267 }
1262 1268
1263 WebContentsImpl* WebContentsImpl::GetCreatedWindow(int route_id) { 1269 WebContentsImpl* WebContentsImpl::GetCreatedWindow(int route_id) {
(...skipping 1806 matching lines...) Expand 10 before | Expand all | Expand 10 after
3070 browser_plugin_host()->embedder_render_process_host(); 3076 browser_plugin_host()->embedder_render_process_host();
3071 *embedder_container_id = browser_plugin_host()->instance_id(); 3077 *embedder_container_id = browser_plugin_host()->instance_id();
3072 int embedder_process_id = 3078 int embedder_process_id =
3073 embedder_render_process_host ? embedder_render_process_host->GetID() : -1; 3079 embedder_render_process_host ? embedder_render_process_host->GetID() : -1;
3074 if (embedder_process_id != -1) { 3080 if (embedder_process_id != -1) {
3075 *embedder_channel_name = 3081 *embedder_channel_name =
3076 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(), 3082 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(),
3077 embedder_process_id); 3083 embedder_process_id);
3078 } 3084 }
3079 } 3085 }
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.cc ('k') | content/common/view_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698