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

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

Issue 11269022: Add Vector2d classes that represent offsets, instead of using Point. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more vector use fixes Created 8 years, 1 month 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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698