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

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

Issue 366009: Revert "Convert tabcontentscontainer to use a vbox instead of a fixed. The" (Closed)
Patch Set: Created 11 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
« no previous file with comments | « chrome/browser/gtk/tab_contents_container_gtk.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 GdkEventButton* event, TabContentsViewGtk* view) { 391 GdkEventButton* event, TabContentsViewGtk* view) {
392 view->last_mouse_down_ = *event; 392 view->last_mouse_down_ = *event;
393 return FALSE; 393 return FALSE;
394 } 394 }
395 395
396 gboolean TabContentsViewGtk::OnSizeAllocate(GtkWidget* widget, 396 gboolean TabContentsViewGtk::OnSizeAllocate(GtkWidget* widget,
397 GtkAllocation* allocation, 397 GtkAllocation* allocation,
398 TabContentsViewGtk* view) { 398 TabContentsViewGtk* view) {
399 int width = allocation->width; 399 int width = allocation->width;
400 int height = allocation->height; 400 int height = allocation->height;
401 view->requested_size_.set_width(width);
402 view->requested_size_.set_height(height);
401 // |delegate()| can be NULL here during browser teardown. 403 // |delegate()| can be NULL here during browser teardown.
402 if (view->tab_contents()->delegate()) 404 if (view->tab_contents()->delegate())
403 height += view->tab_contents()->delegate()->GetExtraRenderViewHeight(); 405 height += view->tab_contents()->delegate()->GetExtraRenderViewHeight();
404 gfx::Size size(width, height); 406 gfx::Size size(width, height);
405 view->requested_size_ = size; 407 view->requested_size_ = size;
406 gtk_container_foreach(GTK_CONTAINER(widget), SetSizeRequest, &size); 408 gtk_container_foreach(GTK_CONTAINER(widget), SetSizeRequest, &size);
407 409
408 return FALSE; 410 return FALSE;
409 } 411 }
410 412
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 gtk_container_child_set_property(GTK_CONTAINER(floating_container), 462 gtk_container_child_set_property(GTK_CONTAINER(floating_container),
461 widget, "x", &value); 463 widget, "x", &value);
462 464
463 int child_y = std::max(half_view_height - (requisition.height / 2), 0); 465 int child_y = std::max(half_view_height - (requisition.height / 2), 0);
464 g_value_set_int(&value, child_y); 466 g_value_set_int(&value, child_y);
465 gtk_container_child_set_property(GTK_CONTAINER(floating_container), 467 gtk_container_child_set_property(GTK_CONTAINER(floating_container),
466 widget, "y", &value); 468 widget, "y", &value);
467 g_value_unset(&value); 469 g_value_unset(&value);
468 } 470 }
469 } 471 }
OLDNEW
« no previous file with comments | « chrome/browser/gtk/tab_contents_container_gtk.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698