| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/renderer_host/gtk_im_context_wrapper.h" | 5 #include "content/browser/renderer_host/gtk_im_context_wrapper.h" |
| 6 | 6 |
| 7 #include <gdk/gdk.h> | 7 #include <gdk/gdk.h> |
| 8 #include <gdk/gdkkeysyms.h> | 8 #include <gdk/gdkkeysyms.h> |
| 9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
| 10 | 10 |
| 11 #include <algorithm> | 11 #include <algorithm> |
| 12 | 12 |
| 13 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/string_util.h" | 14 #include "base/string_util.h" |
| 15 #include "base/utf_string_conversions.h" | 15 #include "base/utf_string_conversions.h" |
| 16 #include "content/browser/renderer_host/render_widget_host_impl.h" | 16 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 17 #include "content/browser/renderer_host/render_widget_host_view_gtk.h" | 17 #include "content/browser/renderer_host/render_widget_host_view_gtk.h" |
| 18 #include "content/public/browser/native_web_keyboard_event.h" | 18 #include "content/public/browser/native_web_keyboard_event.h" |
| 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderli
ne.h" | 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderli
ne.h" |
| 20 #include "ui/base/gtk/gtk_im_context_util.h" | 20 #include "ui/base/gtk/gtk_im_context_util.h" |
| 21 #include "ui/gfx/gtk_util.h" | 21 #include "ui/gfx/gtk_util.h" |
| 22 #include "ui/gfx/rect.h" | 22 #include "ui/gfx/rect.h" |
| 23 | 23 |
| 24 using content::RenderWidgetHostImpl; |
| 25 |
| 24 namespace { | 26 namespace { |
| 25 // Copied from third_party/WebKit/Source/WebCore/page/EventHandler.cpp | 27 // Copied from third_party/WebKit/Source/WebCore/page/EventHandler.cpp |
| 26 // | 28 // |
| 27 // Match key code of composition keydown event on windows. | 29 // Match key code of composition keydown event on windows. |
| 28 // IE sends VK_PROCESSKEY which has value 229; | 30 // IE sends VK_PROCESSKEY which has value 229; |
| 29 // | 31 // |
| 30 // Please refer to following documents for detals: | 32 // Please refer to following documents for detals: |
| 31 // - Virtual-Key Codes | 33 // - Virtual-Key Codes |
| 32 // http://msdn.microsoft.com/en-us/library/ms645540(VS.85).aspx | 34 // http://msdn.microsoft.com/en-us/library/ms645540(VS.85).aspx |
| 33 // - How the IME System Works | 35 // - How the IME System Works |
| (...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 654 | 656 |
| 655 void GtkIMContextWrapper::HandleHostViewRealizeThunk( | 657 void GtkIMContextWrapper::HandleHostViewRealizeThunk( |
| 656 GtkWidget* widget, GtkIMContextWrapper* self) { | 658 GtkWidget* widget, GtkIMContextWrapper* self) { |
| 657 self->HandleHostViewRealize(widget); | 659 self->HandleHostViewRealize(widget); |
| 658 } | 660 } |
| 659 | 661 |
| 660 void GtkIMContextWrapper::HandleHostViewUnrealizeThunk( | 662 void GtkIMContextWrapper::HandleHostViewUnrealizeThunk( |
| 661 GtkWidget* widget, GtkIMContextWrapper* self) { | 663 GtkWidget* widget, GtkIMContextWrapper* self) { |
| 662 self->HandleHostViewUnrealize(); | 664 self->HandleHostViewUnrealize(); |
| 663 } | 665 } |
| OLD | NEW |