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

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

Issue 16256018: Update content/ to use WeakPtr<T>::get() instead of implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix incorrectly modified code Created 7 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
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 1b7a4e52e88affef46aff264ad4196a11af74c5b..193f6b5c128d1b62ef7ff41fde6c5867acbc93de 100644
--- a/content/renderer/browser_plugin/browser_plugin.cc
+++ b/content/renderer/browser_plugin/browser_plugin.cc
@@ -450,7 +450,7 @@ void BrowserPlugin::OnAddMessageToConsole(
}
void BrowserPlugin::OnAdvanceFocus(int guest_instance_id, bool reverse) {
- DCHECK(render_view_);
+ DCHECK(render_view_.get());
render_view_->GetWebView()->advanceFocus(reverse);
}
@@ -936,7 +936,7 @@ void BrowserPlugin::ParseAttributes() {
}
float BrowserPlugin::GetDeviceScaleFactor() const {
- if (!render_view_)
+ if (!render_view_.get())
return 1.0f;
return render_view_->GetWebView()->deviceScaleFactor();
}
@@ -1036,7 +1036,7 @@ void BrowserPlugin::WeakCallbackForPersistObject(
object->Dispose();
- if (plugin) {
+ if (plugin.get()) {
// Asynchronously remove item from |alive_v8_permission_request_objects_|.
// Note that we are using weak pointer for the following PostTask, so we
// don't need to worry about BrowserPlugin going away.
@@ -1109,7 +1109,7 @@ void BrowserPlugin::UpdateGuestFocusState() {
bool BrowserPlugin::ShouldGuestBeFocused() const {
bool embedder_focused = false;
- if (render_view_)
+ if (render_view_.get())
embedder_focused = render_view_->has_focus();
return plugin_focused_ && embedder_focused;
}
@@ -1219,7 +1219,7 @@ void BrowserPlugin::destroy() {
if (compositing_helper_.get())
compositing_helper_->OnContainerDestroy();
// Will be a no-op if the mouse is not currently locked.
- if (render_view_)
+ if (render_view_.get())
render_view_->mouse_lock_dispatcher()->OnLockTargetDestroyed(this);
base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
}
« no previous file with comments | « content/ppapi_plugin/broker_process_dispatcher.cc ('k') | content/renderer/browser_plugin/browser_plugin_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698