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

Side by Side Diff: chrome/browser/tab_contents/tab_contents_view_gtk.cc

Issue 1084003: Fix HTML5 effectAllowed and dragEffect on Chrome Linux. (Closed)
Patch Set: actual Created 10 years, 9 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/tab_contents/tab_contents_view_gtk.h" 5 #include "chrome/browser/tab_contents/tab_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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 context_menu_->Popup(point); 320 context_menu_->Popup(point);
321 } 321 }
322 322
323 // Render view DnD ------------------------------------------------------------- 323 // Render view DnD -------------------------------------------------------------
324 324
325 void TabContentsViewGtk::StartDragging(const WebDropData& drop_data, 325 void TabContentsViewGtk::StartDragging(const WebDropData& drop_data,
326 WebDragOperationsMask ops, 326 WebDragOperationsMask ops,
327 const SkBitmap& image, 327 const SkBitmap& image,
328 const gfx::Point& image_offset) { 328 const gfx::Point& image_offset) {
329 DCHECK(GetContentNativeView()); 329 DCHECK(GetContentNativeView());
330 330 drag_source_->StartDragging(drop_data, ops, &last_mouse_down_, image,
331 drag_source_->StartDragging(drop_data, &last_mouse_down_, image,
332 image_offset); 331 image_offset);
333 // TODO(snej): Make use of the WebDragOperationsMask somehow
334 } 332 }
335 333
336 // ----------------------------------------------------------------------------- 334 // -----------------------------------------------------------------------------
337 335
338 void TabContentsViewGtk::InsertIntoContentArea(GtkWidget* widget) { 336 void TabContentsViewGtk::InsertIntoContentArea(GtkWidget* widget) {
339 gtk_container_add(GTK_CONTAINER(expanded_), widget); 337 gtk_container_add(GTK_CONTAINER(expanded_), widget);
340 } 338 }
341 339
342 gboolean TabContentsViewGtk::OnMouseDown(GtkWidget* widget, 340 gboolean TabContentsViewGtk::OnMouseDown(GtkWidget* widget,
343 GdkEventButton* event) { 341 GdkEventButton* event) {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 gtk_container_child_set_property(GTK_CONTAINER(floating_container), 391 gtk_container_child_set_property(GTK_CONTAINER(floating_container),
394 widget, "x", &value); 392 widget, "x", &value);
395 393
396 int child_y = std::max(half_view_height - (requisition.height / 2), 0); 394 int child_y = std::max(half_view_height - (requisition.height / 2), 0);
397 g_value_set_int(&value, child_y); 395 g_value_set_int(&value, child_y);
398 gtk_container_child_set_property(GTK_CONTAINER(floating_container), 396 gtk_container_child_set_property(GTK_CONTAINER(floating_container),
399 widget, "y", &value); 397 widget, "y", &value);
400 g_value_unset(&value); 398 g_value_unset(&value);
401 } 399 }
402 } 400 }
OLDNEW
« no previous file with comments | « chrome/browser/gtk/tab_contents_drag_source.cc ('k') | chrome/browser/tab_contents/web_drag_dest_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698