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 <cairo/cairo.h> | 9 #include <cairo/cairo.h> |
10 | 10 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 RenderWidgetHostViewGtk* host_view) { | 70 RenderWidgetHostViewGtk* host_view) { |
71 const gfx::Rect damage_rect(expose->area); | 71 const gfx::Rect damage_rect(expose->area); |
72 host_view->Paint(damage_rect); | 72 host_view->Paint(damage_rect); |
73 return FALSE; | 73 return FALSE; |
74 } | 74 } |
75 | 75 |
76 static gboolean KeyPressReleaseEvent(GtkWidget* widget, GdkEventKey* event, | 76 static gboolean KeyPressReleaseEvent(GtkWidget* widget, GdkEventKey* event, |
77 RenderWidgetHostViewGtk* host_view) { | 77 RenderWidgetHostViewGtk* host_view) { |
78 WebKeyboardEvent wke(event); | 78 WebKeyboardEvent wke(event); |
79 host_view->GetRenderWidgetHost()->ForwardKeyboardEvent(wke); | 79 host_view->GetRenderWidgetHost()->ForwardKeyboardEvent(wke); |
80 | |
81 // See note in webwidget_host_gtk.cc::HandleKeyPress(). | |
82 if (event->type == GDK_KEY_PRESS) { | |
83 wke.type = WebKeyboardEvent::CHAR; | |
84 host_view->GetRenderWidgetHost()->ForwardKeyboardEvent(wke); | |
85 } | |
86 | |
87 return FALSE; | 80 return FALSE; |
88 } | 81 } |
89 | 82 |
90 static gboolean FocusIn(GtkWidget* widget, GdkEventFocus* focus, | 83 static gboolean FocusIn(GtkWidget* widget, GdkEventFocus* focus, |
91 RenderWidgetHostViewGtk* host_view) { | 84 RenderWidgetHostViewGtk* host_view) { |
92 host_view->GetRenderWidgetHost()->Focus(); | 85 host_view->GetRenderWidgetHost()->Focus(); |
93 return FALSE; | 86 return FALSE; |
94 } | 87 } |
95 | 88 |
96 static gboolean FocusOut(GtkWidget* widget, GdkEventFocus* focus, | 89 static gboolean FocusOut(GtkWidget* widget, GdkEventFocus* focus, |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 GdkWindow* window = view_->window; | 287 GdkWindow* window = view_->window; |
295 if (window) { | 288 if (window) { |
296 backing_store->ShowRect( | 289 backing_store->ShowRect( |
297 damage_rect, x11_util::GetX11WindowFromGtkWidget(view_)); | 290 damage_rect, x11_util::GetX11WindowFromGtkWidget(view_)); |
298 } | 291 } |
299 } else { | 292 } else { |
300 NOTIMPLEMENTED(); | 293 NOTIMPLEMENTED(); |
301 } | 294 } |
302 } | 295 } |
303 | 296 |
OLD | NEW |