| OLD | NEW |
| 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/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/ui/gtk/status_bubble_gtk.h" | 10 #include "chrome/browser/ui/gtk/status_bubble_gtk.h" |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 } | 205 } |
| 206 | 206 |
| 207 // No preview contents; let the default handler run. | 207 // No preview contents; let the default handler run. |
| 208 return FALSE; | 208 return FALSE; |
| 209 } | 209 } |
| 210 | 210 |
| 211 // ----------------------------------------------------------------------------- | 211 // ----------------------------------------------------------------------------- |
| 212 // ViewIDUtil::Delegate implementation | 212 // ViewIDUtil::Delegate implementation |
| 213 | 213 |
| 214 GtkWidget* TabContentsContainerGtk::GetWidgetForViewID(ViewID view_id) { | 214 GtkWidget* TabContentsContainerGtk::GetWidgetForViewID(ViewID view_id) { |
| 215 if (view_id == VIEW_ID_TAB_CONTAINER || | 215 if (view_id == VIEW_ID_TAB_CONTAINER) |
| 216 view_id == VIEW_ID_TAB_CONTAINER_FOCUS_VIEW) { | |
| 217 return widget(); | 216 return widget(); |
| 218 } | |
| 219 | 217 |
| 220 return NULL; | 218 return NULL; |
| 221 } | 219 } |
| 222 | 220 |
| 223 // ----------------------------------------------------------------------------- | 221 // ----------------------------------------------------------------------------- |
| 224 | 222 |
| 225 // static | 223 // static |
| 226 void TabContentsContainerGtk::OnSetFloatingPosition( | 224 void TabContentsContainerGtk::OnSetFloatingPosition( |
| 227 GtkFloatingContainer* floating_container, GtkAllocation* allocation, | 225 GtkFloatingContainer* floating_container, GtkAllocation* allocation, |
| 228 TabContentsContainerGtk* tab_contents_container) { | 226 TabContentsContainerGtk* tab_contents_container) { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 243 g_value_set_int(&value, allocation->width - requisition.width); | 241 g_value_set_int(&value, allocation->width - requisition.width); |
| 244 gtk_container_child_set_property(GTK_CONTAINER(floating_container), | 242 gtk_container_child_set_property(GTK_CONTAINER(floating_container), |
| 245 status->widget(), "x", &value); | 243 status->widget(), "x", &value); |
| 246 | 244 |
| 247 int child_y = std::max(allocation->height - requisition.height, 0); | 245 int child_y = std::max(allocation->height - requisition.height, 0); |
| 248 g_value_set_int(&value, child_y + status->y_offset()); | 246 g_value_set_int(&value, child_y + status->y_offset()); |
| 249 gtk_container_child_set_property(GTK_CONTAINER(floating_container), | 247 gtk_container_child_set_property(GTK_CONTAINER(floating_container), |
| 250 status->widget(), "y", &value); | 248 status->widget(), "y", &value); |
| 251 g_value_unset(&value); | 249 g_value_unset(&value); |
| 252 } | 250 } |
| OLD | NEW |