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" | |
11 #include "chrome/browser/ui/gtk/gtk_expanded_container.h" | 10 #include "chrome/browser/ui/gtk/gtk_expanded_container.h" |
12 #include "chrome/browser/ui/gtk/gtk_floating_container.h" | 11 #include "chrome/browser/ui/gtk/gtk_floating_container.h" |
13 #include "chrome/browser/ui/gtk/status_bubble_gtk.h" | 12 #include "chrome/browser/ui/gtk/status_bubble_gtk.h" |
14 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 13 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 14 #include "content/browser/renderer_host/render_widget_host_view_gtk.h" |
15 #include "content/browser/tab_contents/tab_contents.h" | 15 #include "content/browser/tab_contents/tab_contents.h" |
16 #include "content/common/notification_source.h" | 16 #include "content/common/notification_source.h" |
17 #include "ui/gfx/native_widget_types.h" | 17 #include "ui/gfx/native_widget_types.h" |
18 | 18 |
19 TabContentsContainerGtk::TabContentsContainerGtk(StatusBubbleGtk* status_bubble) | 19 TabContentsContainerGtk::TabContentsContainerGtk(StatusBubbleGtk* status_bubble) |
20 : tab_(NULL), | 20 : tab_(NULL), |
21 preview_(NULL), | 21 preview_(NULL), |
22 status_bubble_(status_bubble) { | 22 status_bubble_(status_bubble) { |
23 Init(); | 23 Init(); |
24 } | 24 } |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 g_value_set_int(&value, allocation->width - requisition.width); | 236 g_value_set_int(&value, allocation->width - requisition.width); |
237 gtk_container_child_set_property(GTK_CONTAINER(floating_container), | 237 gtk_container_child_set_property(GTK_CONTAINER(floating_container), |
238 status->widget(), "x", &value); | 238 status->widget(), "x", &value); |
239 | 239 |
240 int child_y = std::max(allocation->height - requisition.height, 0); | 240 int child_y = std::max(allocation->height - requisition.height, 0); |
241 g_value_set_int(&value, child_y + status->y_offset()); | 241 g_value_set_int(&value, child_y + status->y_offset()); |
242 gtk_container_child_set_property(GTK_CONTAINER(floating_container), | 242 gtk_container_child_set_property(GTK_CONTAINER(floating_container), |
243 status->widget(), "y", &value); | 243 status->widget(), "y", &value); |
244 g_value_unset(&value); | 244 g_value_unset(&value); |
245 } | 245 } |
OLD | NEW |