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/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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 } | 247 } |
248 | 248 |
249 void TabContentsViewGtk::RestoreFocus() { | 249 void TabContentsViewGtk::RestoreFocus() { |
250 if (focus_store_.widget()) | 250 if (focus_store_.widget()) |
251 gtk_widget_grab_focus(focus_store_.widget()); | 251 gtk_widget_grab_focus(focus_store_.widget()); |
252 else | 252 else |
253 SetInitialFocus(); | 253 SetInitialFocus(); |
254 } | 254 } |
255 | 255 |
256 void TabContentsViewGtk::UpdatePreferredSize(const gfx::Size& pref_size) { | 256 void TabContentsViewGtk::UpdatePreferredSize(const gfx::Size& pref_size) { |
| 257 tab_contents_->UpdatePreferredSize(pref_size); |
257 } | 258 } |
258 | 259 |
259 bool TabContentsViewGtk::IsDoingDrag() const { | 260 bool TabContentsViewGtk::IsDoingDrag() const { |
260 return false; | 261 return false; |
261 } | 262 } |
262 | 263 |
263 void TabContentsViewGtk::CancelDragAndCloseTab() { | 264 void TabContentsViewGtk::CancelDragAndCloseTab() { |
264 } | 265 } |
265 | 266 |
266 bool TabContentsViewGtk::IsEventTracking() const { | 267 bool TabContentsViewGtk::IsEventTracking() const { |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 g_value_set_int(&value, child_x); | 505 g_value_set_int(&value, child_x); |
505 gtk_container_child_set_property(GTK_CONTAINER(floating_container), | 506 gtk_container_child_set_property(GTK_CONTAINER(floating_container), |
506 widget, "x", &value); | 507 widget, "x", &value); |
507 | 508 |
508 int child_y = std::max((allocation->height - requisition.height) / 2, 0); | 509 int child_y = std::max((allocation->height - requisition.height) / 2, 0); |
509 g_value_set_int(&value, child_y); | 510 g_value_set_int(&value, child_y); |
510 gtk_container_child_set_property(GTK_CONTAINER(floating_container), | 511 gtk_container_child_set_property(GTK_CONTAINER(floating_container), |
511 widget, "y", &value); | 512 widget, "y", &value); |
512 g_value_unset(&value); | 513 g_value_unset(&value); |
513 } | 514 } |
OLD | NEW |