| 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/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 <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 | 9 |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 if (focus_store_.widget()) | 257 if (focus_store_.widget()) |
| 258 gtk_widget_grab_focus(focus_store_.widget()); | 258 gtk_widget_grab_focus(focus_store_.widget()); |
| 259 else | 259 else |
| 260 SetInitialFocus(); | 260 SetInitialFocus(); |
| 261 } | 261 } |
| 262 | 262 |
| 263 void TabContentsViewGtk::UpdateDragCursor(bool is_drop_target) { | 263 void TabContentsViewGtk::UpdateDragCursor(bool is_drop_target) { |
| 264 NOTIMPLEMENTED(); | 264 NOTIMPLEMENTED(); |
| 265 } | 265 } |
| 266 | 266 |
| 267 void TabContentsViewGtk::GotFocus() { |
| 268 NOTIMPLEMENTED(); |
| 269 } |
| 270 |
| 267 // This is called when we the renderer asks us to take focus back (i.e., it has | 271 // This is called when we the renderer asks us to take focus back (i.e., it has |
| 268 // iterated past the last focusable element on the page). | 272 // iterated past the last focusable element on the page). |
| 269 void TabContentsViewGtk::TakeFocus(bool reverse) { | 273 void TabContentsViewGtk::TakeFocus(bool reverse) { |
| 270 gtk_widget_child_focus(GTK_WIDGET(GetTopLevelNativeWindow()), | 274 gtk_widget_child_focus(GTK_WIDGET(GetTopLevelNativeWindow()), |
| 271 reverse ? GTK_DIR_TAB_BACKWARD : GTK_DIR_TAB_FORWARD); | 275 reverse ? GTK_DIR_TAB_BACKWARD : GTK_DIR_TAB_FORWARD); |
| 272 } | 276 } |
| 273 | 277 |
| 274 void TabContentsViewGtk::HandleKeyboardEvent( | 278 void TabContentsViewGtk::HandleKeyboardEvent( |
| 275 const NativeWebKeyboardEvent& event) { | 279 const NativeWebKeyboardEvent& event) { |
| 276 #if defined(TOOLKIT_VIEWS) | 280 #if defined(TOOLKIT_VIEWS) |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 widget, "x", &value); | 378 widget, "x", &value); |
| 375 | 379 |
| 376 int child_y = std::max( | 380 int child_y = std::max( |
| 377 allocation->y + allocation->height - requisition.height, 0); | 381 allocation->y + allocation->height - requisition.height, 0); |
| 378 g_value_set_int(&value, child_y); | 382 g_value_set_int(&value, child_y); |
| 379 gtk_container_child_set_property(GTK_CONTAINER(floating_container), | 383 gtk_container_child_set_property(GTK_CONTAINER(floating_container), |
| 380 widget, "y", &value); | 384 widget, "y", &value); |
| 381 g_value_unset(&value); | 385 g_value_unset(&value); |
| 382 } | 386 } |
| 383 } | 387 } |
| OLD | NEW |