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 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_GTK_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_GTK_H_ |
6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_GTK_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_GTK_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <gdk/gdk.h> | 9 #include <gdk/gdk.h> |
10 | 10 |
11 #include <string> | 11 #include <string> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "base/time.h" | 15 #include "base/time.h" |
16 #include "chrome/browser/ui/gtk/owned_widget_gtk.h" | |
17 #include "content/browser/renderer_host/render_widget_host_view.h" | 16 #include "content/browser/renderer_host/render_widget_host_view.h" |
18 #include "ui/base/animation/animation_delegate.h" | 17 #include "ui/base/animation/animation_delegate.h" |
19 #include "ui/base/animation/slide_animation.h" | 18 #include "ui/base/animation/slide_animation.h" |
20 #include "ui/base/gtk/gtk_signal.h" | 19 #include "ui/base/gtk/gtk_signal.h" |
| 20 #include "ui/base/gtk/owned_widget_gtk.h" |
21 #include "ui/gfx/native_widget_types.h" | 21 #include "ui/gfx/native_widget_types.h" |
22 #include "ui/gfx/rect.h" | 22 #include "ui/gfx/rect.h" |
23 #include "webkit/glue/webcursor.h" | 23 #include "webkit/glue/webcursor.h" |
24 #include "webkit/plugins/npapi/gtk_plugin_container_manager.h" | 24 #include "webkit/plugins/npapi/gtk_plugin_container_manager.h" |
25 | 25 |
26 class RenderWidgetHost; | 26 class RenderWidgetHost; |
27 class GtkIMContextWrapper; | 27 class GtkIMContextWrapper; |
28 #if !defined(TOOLKIT_VIEWS) | |
29 class MenuGtk; | |
30 #endif | |
31 struct NativeWebKeyboardEvent; | 28 struct NativeWebKeyboardEvent; |
32 | 29 |
33 #if defined(OS_CHROMEOS) | 30 #if defined(OS_CHROMEOS) |
34 namespace views { | 31 namespace views { |
35 class TooltipWindowGtk; | 32 class TooltipWindowGtk; |
36 } | 33 } |
37 #else | 34 #else |
38 class GtkKeyBindingsHandler; | 35 class GtkKeyBindingsHandler; |
39 #endif // defined(OS_CHROMEOS) | 36 #endif // defined(OS_CHROMEOS) |
40 | 37 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 // calls GtkKeyBindingsHandler::Match() against the event and send matched | 124 // calls GtkKeyBindingsHandler::Match() against the event and send matched |
128 // edit commands to renderer by calling | 125 // edit commands to renderer by calling |
129 // RenderWidgetHost::ForwardEditCommandsForNextKeyEvent(). | 126 // RenderWidgetHost::ForwardEditCommandsForNextKeyEvent(). |
130 void ForwardKeyboardEvent(const NativeWebKeyboardEvent& event); | 127 void ForwardKeyboardEvent(const NativeWebKeyboardEvent& event); |
131 | 128 |
132 GdkEventButton* last_mouse_down() const { | 129 GdkEventButton* last_mouse_down() const { |
133 return last_mouse_down_; | 130 return last_mouse_down_; |
134 } | 131 } |
135 | 132 |
136 #if !defined(TOOLKIT_VIEWS) | 133 #if !defined(TOOLKIT_VIEWS) |
137 // Appends the input methods context menu to the specified |menu| object as a | 134 // Builds a submenu containing all the gtk input method commands. |
138 // submenu. | 135 GtkWidget* BuildInputMethodsGtkMenu(); |
139 void AppendInputMethodsContextMenu(MenuGtk* menu); | |
140 #endif | 136 #endif |
141 | 137 |
142 private: | 138 private: |
143 friend class RenderWidgetHostViewGtkWidget; | 139 friend class RenderWidgetHostViewGtkWidget; |
144 | 140 |
145 CHROMEGTK_CALLBACK_1(RenderWidgetHostViewGtk, | 141 CHROMEGTK_CALLBACK_1(RenderWidgetHostViewGtk, |
146 gboolean, | 142 gboolean, |
147 OnWindowStateEvent, | 143 OnWindowStateEvent, |
148 GdkEventWindowState*); | 144 GdkEventWindowState*); |
149 | 145 |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 // menus and drags. | 264 // menus and drags. |
269 GdkEventButton* last_mouse_down_; | 265 GdkEventButton* last_mouse_down_; |
270 | 266 |
271 #if defined(OS_CHROMEOS) | 267 #if defined(OS_CHROMEOS) |
272 // Custimized tooltip window. | 268 // Custimized tooltip window. |
273 scoped_ptr<views::TooltipWindowGtk> tooltip_window_; | 269 scoped_ptr<views::TooltipWindowGtk> tooltip_window_; |
274 #endif // defined(OS_CHROMEOS) | 270 #endif // defined(OS_CHROMEOS) |
275 }; | 271 }; |
276 | 272 |
277 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_GTK_H_ | 273 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_GTK_H_ |
OLD | NEW |