| 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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 tab_contents()->render_view_host()->render_view_termination_status(); | 407 tab_contents()->render_view_host()->render_view_termination_status(); |
| 408 SadTabView::Kind kind = | 408 SadTabView::Kind kind = |
| 409 status == base::TERMINATION_STATUS_PROCESS_WAS_KILLED ? | 409 status == base::TERMINATION_STATUS_PROCESS_WAS_KILLED ? |
| 410 SadTabView::KILLED : SadTabView::CRASHED; | 410 SadTabView::KILLED : SadTabView::CRASHED; |
| 411 sad_tab_ = new SadTabView(tab_contents(), kind); | 411 sad_tab_ = new SadTabView(tab_contents(), kind); |
| 412 SetContentsView(sad_tab_); | 412 SetContentsView(sad_tab_); |
| 413 gfx::Rect bounds; | 413 gfx::Rect bounds; |
| 414 GetBounds(&bounds, true); | 414 GetBounds(&bounds, true); |
| 415 sad_tab_->SetBoundsRect(gfx::Rect(0, 0, bounds.width(), bounds.height())); | 415 sad_tab_->SetBoundsRect(gfx::Rect(0, 0, bounds.width(), bounds.height())); |
| 416 gfx::CanvasSkiaPaint canvas(event); | 416 gfx::CanvasSkiaPaint canvas(event); |
| 417 sad_tab_->ProcessPaint(&canvas); | 417 sad_tab_->Paint(&canvas); |
| 418 } | 418 } |
| 419 return false; // False indicates other widgets should get the event as well. | 419 return false; // False indicates other widgets should get the event as well. |
| 420 } | 420 } |
| 421 | 421 |
| 422 void TabContentsViewGtk::OnShow(GtkWidget* widget) { | 422 void TabContentsViewGtk::OnShow(GtkWidget* widget) { |
| 423 WasShown(); | 423 WasShown(); |
| 424 } | 424 } |
| 425 | 425 |
| 426 void TabContentsViewGtk::OnHide(GtkWidget* widget) { | 426 void TabContentsViewGtk::OnHide(GtkWidget* widget) { |
| 427 WasHidden(); | 427 WasHidden(); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 477 // not NULL, else our delegate. | 477 // not NULL, else our delegate. |
| 478 gboolean TabContentsViewGtk::OnMouseMove(GtkWidget* widget, | 478 gboolean TabContentsViewGtk::OnMouseMove(GtkWidget* widget, |
| 479 GdkEventMotion* event) { | 479 GdkEventMotion* event) { |
| 480 if (sad_tab_ != NULL) | 480 if (sad_tab_ != NULL) |
| 481 WidgetGtk::OnMotionNotify(widget, event); | 481 WidgetGtk::OnMotionNotify(widget, event); |
| 482 else if (tab_contents()->delegate()) | 482 else if (tab_contents()->delegate()) |
| 483 tab_contents()->delegate()->ContentsMouseEvent( | 483 tab_contents()->delegate()->ContentsMouseEvent( |
| 484 tab_contents(), views::Screen::GetCursorScreenPoint(), true); | 484 tab_contents(), views::Screen::GetCursorScreenPoint(), true); |
| 485 return FALSE; | 485 return FALSE; |
| 486 } | 486 } |
| OLD | NEW |