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

Unified Diff: content/renderer/browser_plugin/browser_plugin.cc

Issue 857043002: <webview>: Cleanup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comment Created 5 years, 11 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
Index: content/renderer/browser_plugin/browser_plugin.cc
diff --git a/content/renderer/browser_plugin/browser_plugin.cc b/content/renderer/browser_plugin/browser_plugin.cc
index 27ba564b950f12a0d3ed8d97d3ee04d95b8c0cb8..b463abc01af1c56d4e3eb349e42d07ee7971622a 100644
--- a/content/renderer/browser_plugin/browser_plugin.cc
+++ b/content/renderer/browser_plugin/browser_plugin.cc
@@ -168,8 +168,7 @@ void BrowserPlugin::DidCommitCompositorFrame() {
void BrowserPlugin::OnAdvanceFocus(int browser_plugin_instance_id,
bool reverse) {
- RenderViewImpl* render_view =
- RenderViewImpl::FromRoutingID(render_view_routing_id());
+ auto render_view = RenderViewImpl::FromRoutingID(render_view_routing_id());
if (!render_view)
return;
render_view->GetWebView()->advanceFocus(reverse);
@@ -231,8 +230,7 @@ void BrowserPlugin::OnSetCursor(int browser_plugin_instance_id,
void BrowserPlugin::OnSetMouseLock(int browser_plugin_instance_id,
bool enable) {
- RenderViewImpl* render_view =
- RenderViewImpl::FromRoutingID(render_view_routing_id());
+ auto render_view = RenderViewImpl::FromRoutingID(render_view_routing_id());
if (enable) {
if (mouse_locked_ || !render_view)
return;
@@ -271,8 +269,7 @@ void BrowserPlugin::ShowSadGraphic() {
}
float BrowserPlugin::GetDeviceScaleFactor() const {
- RenderViewImpl* render_view =
- RenderViewImpl::FromRoutingID(render_view_routing_id());
+ auto render_view = RenderViewImpl::FromRoutingID(render_view_routing_id());
if (!render_view)
return 1.0f;
return render_view->GetWebView()->deviceScaleFactor();
@@ -303,8 +300,7 @@ void BrowserPlugin::UpdateGuestFocusState(blink::WebFocusType focus_type) {
bool BrowserPlugin::ShouldGuestBeFocused() const {
bool embedder_focused = false;
- RenderViewImpl* render_view =
- RenderViewImpl::FromRoutingID(render_view_routing_id());
+ auto render_view = RenderViewImpl::FromRoutingID(render_view_routing_id());
if (render_view)
embedder_focused = render_view->has_focus();
return plugin_focused_ && embedder_focused;
@@ -368,8 +364,7 @@ void BrowserPlugin::destroy() {
container_ = NULL;
// Will be a no-op if the mouse is not currently locked.
- RenderViewImpl* render_view =
- RenderViewImpl::FromRoutingID(render_view_routing_id());
+ auto render_view = RenderViewImpl::FromRoutingID(render_view_routing_id());
if (render_view)
render_view->mouse_lock_dispatcher()->OnLockTargetDestroyed(this);
base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
« no previous file with comments | « content/browser/browser_plugin/browser_plugin_guest.cc ('k') | extensions/browser/guest_view/guest_view_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698