| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/renderer_host/render_widget_host_view_gtk.h" | 5 #include "chrome/browser/renderer_host/render_widget_host_view_gtk.h" |
| 6 | 6 |
| 7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
| 8 #include <gdk/gdk.h> | 8 #include <gdk/gdk.h> |
| 9 #include <gdk/gdkkeysyms.h> | 9 #include <gdk/gdkkeysyms.h> |
| 10 #include <gdk/gdkx.h> | 10 #include <gdk/gdkx.h> |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 | 94 |
| 95 private: | 95 private: |
| 96 static gboolean SizeAllocate(GtkWidget* widget, GtkAllocation* allocation, | 96 static gboolean SizeAllocate(GtkWidget* widget, GtkAllocation* allocation, |
| 97 RenderWidgetHostViewGtk* host_view) { | 97 RenderWidgetHostViewGtk* host_view) { |
| 98 host_view->GetRenderWidgetHost()->WasResized(); | 98 host_view->GetRenderWidgetHost()->WasResized(); |
| 99 return FALSE; | 99 return FALSE; |
| 100 } | 100 } |
| 101 | 101 |
| 102 static gboolean ExposeEvent(GtkWidget* widget, GdkEventExpose* expose, | 102 static gboolean ExposeEvent(GtkWidget* widget, GdkEventExpose* expose, |
| 103 RenderWidgetHostViewGtk* host_view) { | 103 RenderWidgetHostViewGtk* host_view) { |
| 104 NOTIMPLEMENTED() << " paint " << expose->area.width << " " << expose->area.h
eight; | |
| 105 const gfx::Rect damage_rect(expose->area); | 104 const gfx::Rect damage_rect(expose->area); |
| 106 host_view->Paint(damage_rect); | 105 host_view->Paint(damage_rect); |
| 107 return FALSE; | 106 return FALSE; |
| 108 } | 107 } |
| 109 | 108 |
| 110 static gboolean KeyPressReleaseEvent(GtkWidget* widget, GdkEventKey* event, | 109 static gboolean KeyPressReleaseEvent(GtkWidget* widget, GdkEventKey* event, |
| 111 RenderWidgetHostViewGtk* host_view) { | 110 RenderWidgetHostViewGtk* host_view) { |
| 112 if (host_view->parent_ && host_view->activatable() && | 111 if (host_view->parent_ && host_view->activatable() && |
| 113 GDK_Escape == event->keyval) { | 112 GDK_Escape == event->keyval) { |
| 114 // Force popups to close on Esc just in case the renderer is hung. This | 113 // Force popups to close on Esc just in case the renderer is hung. This |
| (...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 761 } | 760 } |
| 762 } | 761 } |
| 763 | 762 |
| 764 void RenderWidgetHostViewGtk::PluginProcessCrashed(base::ProcessId pid) { | 763 void RenderWidgetHostViewGtk::PluginProcessCrashed(base::ProcessId pid) { |
| 765 for (PluginPidMap::iterator i = plugin_pid_map_.find(pid); | 764 for (PluginPidMap::iterator i = plugin_pid_map_.find(pid); |
| 766 i != plugin_pid_map_.end() && i->first == pid; ++i) { | 765 i != plugin_pid_map_.end() && i->first == pid; ++i) { |
| 767 plugin_container_manager_.DestroyPluginContainer(i->second); | 766 plugin_container_manager_.DestroyPluginContainer(i->second); |
| 768 } | 767 } |
| 769 plugin_pid_map_.erase(pid); | 768 plugin_pid_map_.erase(pid); |
| 770 } | 769 } |
| OLD | NEW |