| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/tab_contents_container_gtk.h" | 5 #include "chrome/browser/ui/gtk/tab_contents_container_gtk.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
| 10 #include "chrome/browser/renderer_host/render_widget_host_view_gtk.h" | 10 #include "chrome/browser/renderer_host/render_widget_host_view_gtk.h" |
| 11 #include "chrome/browser/tab_contents/tab_contents.h" | 11 #include "chrome/browser/tab_contents/tab_contents.h" |
| 12 #include "chrome/browser/ui/gtk/gtk_expanded_container.h" | 12 #include "chrome/browser/ui/gtk/gtk_expanded_container.h" |
| 13 #include "chrome/browser/ui/gtk/gtk_floating_container.h" | 13 #include "chrome/browser/ui/gtk/gtk_floating_container.h" |
| 14 #include "chrome/browser/ui/gtk/status_bubble_gtk.h" | 14 #include "chrome/browser/ui/gtk/status_bubble_gtk.h" |
| 15 #include "chrome/common/notification_source.h" | 15 #include "chrome/common/notification_source.h" |
| 16 #include "gfx/native_widget_types.h" | 16 #include "ui/gfx/native_widget_types.h" |
| 17 | 17 |
| 18 TabContentsContainerGtk::TabContentsContainerGtk(StatusBubbleGtk* status_bubble) | 18 TabContentsContainerGtk::TabContentsContainerGtk(StatusBubbleGtk* status_bubble) |
| 19 : tab_contents_(NULL), | 19 : tab_contents_(NULL), |
| 20 preview_contents_(NULL), | 20 preview_contents_(NULL), |
| 21 status_bubble_(status_bubble) { | 21 status_bubble_(status_bubble) { |
| 22 Init(); | 22 Init(); |
| 23 } | 23 } |
| 24 | 24 |
| 25 TabContentsContainerGtk::~TabContentsContainerGtk() { | 25 TabContentsContainerGtk::~TabContentsContainerGtk() { |
| 26 floating_.Destroy(); | 26 floating_.Destroy(); |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 g_value_set_int(&value, allocation->width - requisition.width); | 235 g_value_set_int(&value, allocation->width - requisition.width); |
| 236 gtk_container_child_set_property(GTK_CONTAINER(floating_container), | 236 gtk_container_child_set_property(GTK_CONTAINER(floating_container), |
| 237 status->widget(), "x", &value); | 237 status->widget(), "x", &value); |
| 238 | 238 |
| 239 int child_y = std::max(allocation->height - requisition.height, 0); | 239 int child_y = std::max(allocation->height - requisition.height, 0); |
| 240 g_value_set_int(&value, child_y + status->y_offset()); | 240 g_value_set_int(&value, child_y + status->y_offset()); |
| 241 gtk_container_child_set_property(GTK_CONTAINER(floating_container), | 241 gtk_container_child_set_property(GTK_CONTAINER(floating_container), |
| 242 status->widget(), "y", &value); | 242 status->widget(), "y", &value); |
| 243 g_value_unset(&value); | 243 g_value_unset(&value); |
| 244 } | 244 } |
| OLD | NEW |