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

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

Issue 1039006: Revert r41803 and r41799 (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' 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 | Annotate | Revision Log
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 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 gfx::Rect bounds; 316 gfx::Rect bounds;
317 GetContainerBounds(&bounds); 317 GetContainerBounds(&bounds);
318 gfx::Point point = bounds.origin(); 318 gfx::Point point = bounds.origin();
319 point.Offset(params.x, params.y); 319 point.Offset(params.x, params.y);
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,
328 const gfx::Point& image_offset) {
329 DCHECK(GetContentNativeView()); 327 DCHECK(GetContentNativeView());
330 328
331 drag_source_->StartDragging(drop_data, &last_mouse_down_, image, 329 drag_source_->StartDragging(drop_data, &last_mouse_down_);
332 image_offset);
333 // TODO(snej): Make use of the WebDragOperationsMask somehow 330 // TODO(snej): Make use of the WebDragOperationsMask somehow
334 } 331 }
335 332
336 // ----------------------------------------------------------------------------- 333 // -----------------------------------------------------------------------------
337 334
338 void TabContentsViewGtk::InsertIntoContentArea(GtkWidget* widget) { 335 void TabContentsViewGtk::InsertIntoContentArea(GtkWidget* widget) {
339 gtk_container_add(GTK_CONTAINER(expanded_), widget); 336 gtk_container_add(GTK_CONTAINER(expanded_), widget);
340 } 337 }
341 338
342 gboolean TabContentsViewGtk::OnMouseDown(GtkWidget* widget, 339 gboolean TabContentsViewGtk::OnMouseDown(GtkWidget* widget,
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 gtk_container_child_set_property(GTK_CONTAINER(floating_container), 394 gtk_container_child_set_property(GTK_CONTAINER(floating_container),
398 widget, "x", &value); 395 widget, "x", &value);
399 396
400 int child_y = std::max(half_view_height - (requisition.height / 2), 0); 397 int child_y = std::max(half_view_height - (requisition.height / 2), 0);
401 g_value_set_int(&value, child_y); 398 g_value_set_int(&value, child_y);
402 gtk_container_child_set_property(GTK_CONTAINER(floating_container), 399 gtk_container_child_set_property(GTK_CONTAINER(floating_container),
403 widget, "y", &value); 400 widget, "y", &value);
404 g_value_unset(&value); 401 g_value_unset(&value);
405 } 402 }
406 } 403 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/tab_contents_view_gtk.h ('k') | chrome/browser/tab_contents/tab_contents_view_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698