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

Side by Side Diff: content/browser/web_contents/web_contents_view_gtk.cc

Issue 10966023: Fix the crash that could occur when the window is closed while web contents drag is in progress. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch to land Created 8 years, 2 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_view_gtk.h" 5 #include "content/browser/web_contents/web_contents_view_gtk.h"
6 6
7 #include <gdk/gdk.h> 7 #include <gdk/gdk.h>
8 #include <gdk/gdkkeysyms.h> 8 #include <gdk/gdkkeysyms.h>
9 #include <gtk/gtk.h> 9 #include <gtk/gtk.h>
10 10
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 focus_store_.Store(GetNativeView()); 235 focus_store_.Store(GetNativeView());
236 } 236 }
237 237
238 void WebContentsViewGtk::RestoreFocus() { 238 void WebContentsViewGtk::RestoreFocus() {
239 if (focus_store_.widget()) 239 if (focus_store_.widget())
240 gtk_widget_grab_focus(focus_store_.widget()); 240 gtk_widget_grab_focus(focus_store_.widget());
241 else 241 else
242 SetInitialFocus(); 242 SetInitialFocus();
243 } 243 }
244 244
245 bool WebContentsViewGtk::IsDoingDrag() const {
246 return false;
247 }
248
249 void WebContentsViewGtk::CancelDragAndCloseTab() {
250 }
251
252 WebDropData* WebContentsViewGtk::GetDropData() const { 245 WebDropData* WebContentsViewGtk::GetDropData() const {
253 return drag_dest_->current_drop_data(); 246 return drag_dest_->current_drop_data();
254 } 247 }
255 248
256 bool WebContentsViewGtk::IsEventTracking() const { 249 bool WebContentsViewGtk::IsEventTracking() const {
257 return false; 250 return false;
258 } 251 }
259 252
260 void WebContentsViewGtk::CloseTabAfterEventTracking() { 253 void WebContentsViewGtk::CloseTabAfterEventTracking() {
261 } 254 }
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 // We manually tell our RWHV to resize the renderer content. This avoids 381 // We manually tell our RWHV to resize the renderer content. This avoids
389 // spurious resizes from GTK+. 382 // spurious resizes from GTK+.
390 RenderWidgetHostView* rwhv = web_contents_->GetRenderWidgetHostView(); 383 RenderWidgetHostView* rwhv = web_contents_->GetRenderWidgetHostView();
391 if (rwhv) 384 if (rwhv)
392 rwhv->SetSize(size); 385 rwhv->SetSize(size);
393 if (web_contents_->GetInterstitialPage()) 386 if (web_contents_->GetInterstitialPage())
394 web_contents_->GetInterstitialPage()->SetSize(size); 387 web_contents_->GetInterstitialPage()->SetSize(size);
395 } 388 }
396 389
397 } // namespace content 390 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698