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

Unified Diff: content/browser/web_contents/web_contents_view_gtk.cc

Issue 14081010: Cleanup: Remove unnecessary ".get()" from scoped_ptrs<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix some gtk issues Created 7 years, 8 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/browser/web_contents/web_contents_view_gtk.cc
diff --git a/content/browser/web_contents/web_contents_view_gtk.cc b/content/browser/web_contents/web_contents_view_gtk.cc
index b70b0df84b5d52e8f4cef2e40fdb669fdbf56a16..9cb9212787816e8c54b169cb2bc5f3a37229a326 100644
--- a/content/browser/web_contents/web_contents_view_gtk.cc
+++ b/content/browser/web_contents/web_contents_view_gtk.cc
@@ -100,7 +100,7 @@ WebContentsViewGtk::WebContentsViewGtk(
gtk_widget_show(expanded_.get());
drag_source_.reset(new WebDragSourceGtk(web_contents));
- if (delegate_.get())
+ if (delegate_)
delegate_->Initialize(expanded_.get(), &focus_store_);
}
@@ -109,7 +109,7 @@ WebContentsViewGtk::~WebContentsViewGtk() {
}
gfx::NativeView WebContentsViewGtk::GetNativeView() const {
- if (delegate_.get())
+ if (delegate_)
return delegate_->GetNativeView();
return expanded_.get();
@@ -151,7 +151,7 @@ void WebContentsViewGtk::OnTabCrashed(base::TerminationStatus status,
void WebContentsViewGtk::Focus() {
if (web_contents_->ShowingInterstitialPage()) {
web_contents_->GetInterstitialPage()->Focus();
- } else if (delegate_.get()) {
+ } else if (delegate_) {
delegate_->Focus();
}
}
@@ -314,7 +314,7 @@ void WebContentsViewGtk::UpdateDragDest(RenderViewHost* host) {
// Create the new drag_dest_.
drag_dest_.reset(new WebDragDestGtk(web_contents_, content_view));
- if (delegate_.get())
+ if (delegate_)
drag_dest_->set_delegate(delegate_->GetDragDestDelegate());
}
@@ -326,7 +326,7 @@ void WebContentsViewGtk::UpdateDragDest(RenderViewHost* host) {
gboolean WebContentsViewGtk::OnFocus(GtkWidget* widget,
GtkDirectionType focus) {
// Give our view wrapper first chance at this event.
- if (delegate_.get()) {
+ if (delegate_) {
gboolean return_value = FALSE;
if (delegate_->OnNativeViewFocusEvent(widget, focus, &return_value))
return return_value;
@@ -347,7 +347,7 @@ gboolean WebContentsViewGtk::OnFocus(GtkWidget* widget,
void WebContentsViewGtk::ShowContextMenu(
const ContextMenuParams& params,
ContextMenuSourceType type) {
- if (delegate_.get())
+ if (delegate_)
delegate_->ShowContextMenu(params, type);
else
DLOG(ERROR) << "Cannot show context menus without a delegate.";
« no previous file with comments | « content/browser/web_contents/web_contents_view_aura.cc ('k') | content/browser/web_contents/web_contents_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698