| 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/views/tab_contents/tab_contents_view_gtk.h" | 5 #include "chrome/browser/ui/views/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 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 // if the location bar was focused and the tab is dragged out), or it may | 316 // if the location bar was focused and the tab is dragged out), or it may |
| 317 // no longer be focusable (e.g. if the location bar was focused and then | 317 // no longer be focusable (e.g. if the location bar was focused and then |
| 318 // we switched to fullscreen mode). In that case we default to the | 318 // we switched to fullscreen mode). In that case we default to the |
| 319 // default focus. | 319 // default focus. |
| 320 SetInitialFocus(); | 320 SetInitialFocus(); |
| 321 } | 321 } |
| 322 view_storage->RemoveView(last_focused_view_storage_id_); | 322 view_storage->RemoveView(last_focused_view_storage_id_); |
| 323 } | 323 } |
| 324 } | 324 } |
| 325 | 325 |
| 326 void TabContentsViewGtk::GetViewBounds(gfx::Rect* out) const { |
| 327 GetBounds(out, true); |
| 328 } |
| 329 |
| 326 void TabContentsViewGtk::UpdateDragCursor(WebDragOperation operation) { | 330 void TabContentsViewGtk::UpdateDragCursor(WebDragOperation operation) { |
| 327 if (drag_dest_.get()) | 331 if (drag_dest_.get()) |
| 328 drag_dest_->UpdateDragStatus(operation); | 332 drag_dest_->UpdateDragStatus(operation); |
| 329 } | 333 } |
| 330 | 334 |
| 331 void TabContentsViewGtk::GotFocus() { | 335 void TabContentsViewGtk::GotFocus() { |
| 332 if (tab_contents()->delegate()) | 336 if (tab_contents()->delegate()) |
| 333 tab_contents()->delegate()->TabContentsFocused(tab_contents()); | 337 tab_contents()->delegate()->TabContentsFocused(tab_contents()); |
| 334 } | 338 } |
| 335 | 339 |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 470 // not NULL, else our delegate. | 474 // not NULL, else our delegate. |
| 471 gboolean TabContentsViewGtk::OnMouseMove(GtkWidget* widget, | 475 gboolean TabContentsViewGtk::OnMouseMove(GtkWidget* widget, |
| 472 GdkEventMotion* event) { | 476 GdkEventMotion* event) { |
| 473 if (sad_tab_ != NULL) | 477 if (sad_tab_ != NULL) |
| 474 WidgetGtk::OnMotionNotify(widget, event); | 478 WidgetGtk::OnMotionNotify(widget, event); |
| 475 else if (tab_contents()->delegate()) | 479 else if (tab_contents()->delegate()) |
| 476 tab_contents()->delegate()->ContentsMouseEvent( | 480 tab_contents()->delegate()->ContentsMouseEvent( |
| 477 tab_contents(), views::Screen::GetCursorScreenPoint(), true); | 481 tab_contents(), views::Screen::GetCursorScreenPoint(), true); |
| 478 return FALSE; | 482 return FALSE; |
| 479 } | 483 } |
| OLD | NEW |