| OLD | NEW |
| 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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 bool allow_multiple_selection) { | 335 bool allow_multiple_selection) { |
| 336 // External popup menus are only used on Mac and Android. | 336 // External popup menus are only used on Mac and Android. |
| 337 NOTIMPLEMENTED(); | 337 NOTIMPLEMENTED(); |
| 338 } | 338 } |
| 339 | 339 |
| 340 // Render view DnD ------------------------------------------------------------- | 340 // Render view DnD ------------------------------------------------------------- |
| 341 | 341 |
| 342 void WebContentsViewGtk::StartDragging(const WebDropData& drop_data, | 342 void WebContentsViewGtk::StartDragging(const WebDropData& drop_data, |
| 343 WebDragOperationsMask ops, | 343 WebDragOperationsMask ops, |
| 344 const gfx::ImageSkia& image, | 344 const gfx::ImageSkia& image, |
| 345 const gfx::Point& image_offset) { | 345 const gfx::Vector2d& image_offset) { |
| 346 DCHECK(GetContentNativeView()); | 346 DCHECK(GetContentNativeView()); |
| 347 | 347 |
| 348 RenderWidgetHostViewGtk* view_gtk = static_cast<RenderWidgetHostViewGtk*>( | 348 RenderWidgetHostViewGtk* view_gtk = static_cast<RenderWidgetHostViewGtk*>( |
| 349 web_contents_->GetRenderWidgetHostView()); | 349 web_contents_->GetRenderWidgetHostView()); |
| 350 if (!view_gtk || !view_gtk->GetLastMouseDown()) | 350 if (!view_gtk || !view_gtk->GetLastMouseDown()) |
| 351 return; | 351 return; |
| 352 | 352 |
| 353 drag_source_->StartDragging(drop_data, ops, view_gtk->GetLastMouseDown(), | 353 drag_source_->StartDragging(drop_data, ops, view_gtk->GetLastMouseDown(), |
| 354 *image.bitmap(), image_offset); | 354 *image.bitmap(), image_offset); |
| 355 } | 355 } |
| (...skipping 22 matching lines...) Expand all Loading... |
| 378 // We manually tell our RWHV to resize the renderer content. This avoids | 378 // We manually tell our RWHV to resize the renderer content. This avoids |
| 379 // spurious resizes from GTK+. | 379 // spurious resizes from GTK+. |
| 380 RenderWidgetHostView* rwhv = web_contents_->GetRenderWidgetHostView(); | 380 RenderWidgetHostView* rwhv = web_contents_->GetRenderWidgetHostView(); |
| 381 if (rwhv) | 381 if (rwhv) |
| 382 rwhv->SetSize(size); | 382 rwhv->SetSize(size); |
| 383 if (web_contents_->GetInterstitialPage()) | 383 if (web_contents_->GetInterstitialPage()) |
| 384 web_contents_->GetInterstitialPage()->SetSize(size); | 384 web_contents_->GetInterstitialPage()->SetSize(size); |
| 385 } | 385 } |
| 386 | 386 |
| 387 } // namespace content | 387 } // namespace content |
| OLD | NEW |