OLD | NEW |
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/gtk/tab_contents_container_gtk.h" | 5 #include "chrome/browser/gtk/tab_contents_container_gtk.h" |
6 | 6 |
| 7 #include "app/gfx/native_widget_types.h" |
7 #include "app/l10n_util.h" | 8 #include "app/l10n_util.h" |
8 #include "base/gfx/native_widget_types.h" | |
9 #include "chrome/browser/gtk/gtk_floating_container.h" | 9 #include "chrome/browser/gtk/gtk_floating_container.h" |
10 #include "chrome/browser/gtk/status_bubble_gtk.h" | 10 #include "chrome/browser/gtk/status_bubble_gtk.h" |
11 #include "chrome/browser/tab_contents/tab_contents.h" | 11 #include "chrome/browser/tab_contents/tab_contents.h" |
12 #include "chrome/browser/renderer_host/render_widget_host_view_gtk.h" | 12 #include "chrome/browser/renderer_host/render_widget_host_view_gtk.h" |
13 #include "chrome/common/notification_service.h" | 13 #include "chrome/common/notification_service.h" |
14 | 14 |
15 namespace { | 15 namespace { |
16 | 16 |
17 // Allocates all normal tab contents views to the size of the passed in | 17 // Allocates all normal tab contents views to the size of the passed in |
18 // |allocation|. | 18 // |allocation|. |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 gtk_container_child_set_property(GTK_CONTAINER(floating_container), | 204 gtk_container_child_set_property(GTK_CONTAINER(floating_container), |
205 status, "x", &value); | 205 status, "x", &value); |
206 | 206 |
207 int child_y = std::max( | 207 int child_y = std::max( |
208 allocation->y + allocation->height - requisition.height, 0); | 208 allocation->y + allocation->height - requisition.height, 0); |
209 g_value_set_int(&value, child_y); | 209 g_value_set_int(&value, child_y); |
210 gtk_container_child_set_property(GTK_CONTAINER(floating_container), | 210 gtk_container_child_set_property(GTK_CONTAINER(floating_container), |
211 status, "y", &value); | 211 status, "y", &value); |
212 g_value_unset(&value); | 212 g_value_unset(&value); |
213 } | 213 } |
OLD | NEW |