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

Side by Side Diff: chrome/browser/ui/gtk/tabs/dragged_view_gtk.cc

Issue 9600036: Move Render(View|Widget)Host and associated classes to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Respond to review comments. Created 8 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) 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 "chrome/browser/ui/gtk/tabs/dragged_view_gtk.h" 5 #include "chrome/browser/ui/gtk/tabs/dragged_view_gtk.h"
6 6
7 #include <gdk/gdk.h> 7 #include <gdk/gdk.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 392
393 // Only used when not attached. 393 // Only used when not attached.
394 int tab_height = static_cast<int>( 394 int tab_height = static_cast<int>(
395 kScalingFactor * renderers_[drag_data_->source_tab_index()]->height()); 395 kScalingFactor * renderers_[drag_data_->source_tab_index()]->height());
396 396
397 GtkAllocation allocation; 397 GtkAllocation allocation;
398 gtk_widget_get_allocation(widget, &allocation); 398 gtk_widget_get_allocation(widget, &allocation);
399 399
400 // Draw the render area. 400 // Draw the render area.
401 if (!attached_) { 401 if (!attached_) {
402 RenderWidgetHost* render_widget_host = drag_data_->GetSourceWebContents()-> 402 content::RenderWidgetHost* render_widget_host =
403 GetRenderViewHost(); 403 drag_data_->GetSourceWebContents()->GetRenderViewHost();
404 404
405 // This leaves room for the border. 405 // This leaves room for the border.
406 gfx::Rect dest_rect(kDragFrameBorderSize, tab_height, 406 gfx::Rect dest_rect(kDragFrameBorderSize, tab_height,
407 allocation.width - kTwiceDragFrameBorderSize, 407 allocation.width - kTwiceDragFrameBorderSize,
408 allocation.height - tab_height - 408 allocation.height - tab_height -
409 kDragFrameBorderSize); 409 kDragFrameBorderSize);
410 render_widget_host->CopyFromBackingStoreToGtkWindow( 410 render_widget_host->CopyFromBackingStoreToGtkWindow(
411 dest_rect, GDK_DRAWABLE(gtk_widget_get_window(widget))); 411 dest_rect, GDK_DRAWABLE(gtk_widget_get_window(widget)));
412 } 412 }
413 413
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 if (!attached_) { 467 if (!attached_) {
468 paint_at = widget_width / kScalingFactor - 468 paint_at = widget_width / kScalingFactor -
469 GetWidthInTabStripFromTo(0, index + 1); 469 GetWidthInTabStripFromTo(0, index + 1);
470 } 470 }
471 } 471 }
472 472
473 cairo_set_source_surface(cr, surface, paint_at, 0); 473 cairo_set_source_surface(cr, surface, paint_at, 0);
474 cairo_paint(cr); 474 cairo_paint(cr);
475 cairo_surface_destroy(surface); 475 cairo_surface_destroy(surface);
476 } 476 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/notifications/balloon_view_host_gtk.cc ('k') | chrome/browser/ui/login/login_prompt.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698