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 // If this gets included after the gtk headers, then a bunch of compiler | 7 // If this gets included after the gtk headers, then a bunch of compiler |
8 // errors happen because of a "#define Status int" in Xlib.h, which interacts | 8 // errors happen because of a "#define Status int" in Xlib.h, which interacts |
9 // badly with URLRequestStatus::Status. | 9 // badly with URLRequestStatus::Status. |
10 #include "chrome/common/render_messages.h" | 10 #include "chrome/common/render_messages.h" |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 fake_event.windowY = fake_event.y = y; | 141 fake_event.windowY = fake_event.y = y; |
142 gdk_window_get_origin(widget->window, &x, &y); | 142 gdk_window_get_origin(widget->window, &x, &y); |
143 fake_event.globalX = fake_event.x + x; | 143 fake_event.globalX = fake_event.x + x; |
144 fake_event.globalY = fake_event.y + y; | 144 fake_event.globalY = fake_event.y + y; |
145 fake_event.type = WebKit::WebInputEvent::MouseMove; | 145 fake_event.type = WebKit::WebInputEvent::MouseMove; |
146 fake_event.button = WebKit::WebMouseEvent::ButtonNone; | 146 fake_event.button = WebKit::WebMouseEvent::ButtonNone; |
147 host_view->GetRenderWidgetHost()->ForwardMouseEvent(fake_event); | 147 host_view->GetRenderWidgetHost()->ForwardMouseEvent(fake_event); |
148 } | 148 } |
149 | 149 |
150 host_view->ShowCurrentCursor(); | 150 host_view->ShowCurrentCursor(); |
151 host_view->GetRenderWidgetHost()->Focus(); | 151 host_view->GetRenderWidgetHost()->GotFocus(); |
152 | 152 |
153 // The only way to enable a GtkIMContext object is to call its focus in | 153 // The only way to enable a GtkIMContext object is to call its focus in |
154 // handler. | 154 // handler. |
155 host_view->im_context_->OnFocusIn(); | 155 host_view->im_context_->OnFocusIn(); |
156 | 156 |
157 return FALSE; | 157 return FALSE; |
158 } | 158 } |
159 | 159 |
160 // WARNING: OnGrabNotify relies on the fact this function doesn't try to | 160 // WARNING: OnGrabNotify relies on the fact this function doesn't try to |
161 // dereference |focus|. | 161 // dereference |focus|. |
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
627 } | 627 } |
628 | 628 |
629 void RenderWidgetHostViewGtk::ForwardKeyboardEvent( | 629 void RenderWidgetHostViewGtk::ForwardKeyboardEvent( |
630 const NativeWebKeyboardEvent& event) { | 630 const NativeWebKeyboardEvent& event) { |
631 EditCommands edit_commands; | 631 EditCommands edit_commands; |
632 if (key_bindings_handler_->Match(event, &edit_commands)) { | 632 if (key_bindings_handler_->Match(event, &edit_commands)) { |
633 host_->ForwardEditCommandsForNextKeyEvent(edit_commands); | 633 host_->ForwardEditCommandsForNextKeyEvent(edit_commands); |
634 } | 634 } |
635 host_->ForwardKeyboardEvent(event); | 635 host_->ForwardKeyboardEvent(event); |
636 } | 636 } |
OLD | NEW |