Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(271)

Side by Side Diff: chrome/browser/renderer_host/render_widget_host_view_gtk.h

Issue 159586: This CL fixes issue 11480: Support GTK keyboard themes (emacs keybindings).... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_GTK_H_
6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_GTK_H_ 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_GTK_H_
7 7
8 #include <gdk/gdk.h> 8 #include <gdk/gdk.h>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/gfx/native_widget_types.h" 11 #include "base/gfx/native_widget_types.h"
12 #include "base/scoped_ptr.h" 12 #include "base/scoped_ptr.h"
13 #include "chrome/browser/renderer_host/render_widget_host_view.h" 13 #include "chrome/browser/renderer_host/render_widget_host_view.h"
14 #include "chrome/common/owned_widget_gtk.h" 14 #include "chrome/common/owned_widget_gtk.h"
15 #include "chrome/common/render_messages.h" 15 #include "chrome/common/render_messages.h"
16 #include "webkit/glue/plugins/gtk_plugin_container_manager.h" 16 #include "webkit/glue/plugins/gtk_plugin_container_manager.h"
17 #include "webkit/glue/webcursor.h" 17 #include "webkit/glue/webcursor.h"
18 18
19 class RenderWidgetHost; 19 class RenderWidgetHost;
20 // A conveience wrapper class for GtkIMContext; 20 // A convenience wrapper class for GtkIMContext;
21 class RenderWidgetHostViewGtkIMContext; 21 class RenderWidgetHostViewGtkIMContext;
22 // A convenience class for handling editor key bindings defined in gtk keyboard
23 // theme.
24 class RenderWidgetHostViewGtkKeyBindings;
22 25
23 typedef struct _GtkClipboard GtkClipboard; 26 typedef struct _GtkClipboard GtkClipboard;
24 typedef struct _GtkSelectionData GtkSelectionData; 27 typedef struct _GtkSelectionData GtkSelectionData;
25 typedef struct _GtkIMContext GtkIMContext; 28 typedef struct _GtkIMContext GtkIMContext;
26 29
27 // ----------------------------------------------------------------------------- 30 // -----------------------------------------------------------------------------
28 // See comments in render_widget_host_view.h about this class and its members. 31 // See comments in render_widget_host_view.h about this class and its members.
29 // ----------------------------------------------------------------------------- 32 // -----------------------------------------------------------------------------
30 class RenderWidgetHostViewGtk : public RenderWidgetHostView { 33 class RenderWidgetHostViewGtk : public RenderWidgetHostView {
31 public: 34 public:
(...skipping 28 matching lines...) Expand all
60 virtual void Destroy(); 63 virtual void Destroy();
61 virtual void SetTooltipText(const std::wstring& tooltip_text); 64 virtual void SetTooltipText(const std::wstring& tooltip_text);
62 virtual void SelectionChanged(const std::string& text); 65 virtual void SelectionChanged(const std::string& text);
63 virtual void PasteFromSelectionClipboard(); 66 virtual void PasteFromSelectionClipboard();
64 virtual void ShowingContextMenu(bool showing); 67 virtual void ShowingContextMenu(bool showing);
65 virtual BackingStore* AllocBackingStore(const gfx::Size& size); 68 virtual BackingStore* AllocBackingStore(const gfx::Size& size);
66 virtual gfx::PluginWindowHandle CreatePluginContainer( 69 virtual gfx::PluginWindowHandle CreatePluginContainer(
67 base::ProcessId plugin_process_id); 70 base::ProcessId plugin_process_id);
68 virtual void DestroyPluginContainer(gfx::PluginWindowHandle container); 71 virtual void DestroyPluginContainer(gfx::PluginWindowHandle container);
69 virtual void PluginProcessCrashed(base::ProcessId pid); 72 virtual void PluginProcessCrashed(base::ProcessId pid);
73 virtual bool UnhandledKeyboardEvent(const NativeWebKeyboardEvent& event);
70 74
71 gfx::NativeView native_view() const { return view_.get(); } 75 gfx::NativeView native_view() const { return view_.get(); }
72 76
73 void Paint(const gfx::Rect&); 77 void Paint(const gfx::Rect&);
74 78
75 private: 79 private:
76 friend class RenderWidgetHostViewGtkWidget; 80 friend class RenderWidgetHostViewGtkWidget;
77 81
78 // Update the display cursor for the render view. 82 // Update the display cursor for the render view.
79 void ShowCurrentCursor(); 83 void ShowCurrentCursor();
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 // parent_host_view_->GetNativeView(). 120 // parent_host_view_->GetNativeView().
117 GtkWidget* parent_; 121 GtkWidget* parent_;
118 // We ignore the first mouse release on popups. This allows the popup to 122 // We ignore the first mouse release on popups. This allows the popup to
119 // stay open. 123 // stay open.
120 bool is_popup_first_mouse_release_; 124 bool is_popup_first_mouse_release_;
121 125
122 // Whether or not this widget was focused before shadowed by another widget. 126 // Whether or not this widget was focused before shadowed by another widget.
123 // Used in OnGrabNotify() handler to track the focused state correctly. 127 // Used in OnGrabNotify() handler to track the focused state correctly.
124 bool was_focused_before_grab_; 128 bool was_focused_before_grab_;
125 129
126 // A conveience wrapper object for GtkIMContext; 130 // A convenience wrapper object for GtkIMContext;
127 scoped_ptr<RenderWidgetHostViewGtkIMContext> im_context_; 131 scoped_ptr<RenderWidgetHostViewGtkIMContext> im_context_;
128 132
133 // A convenience object for handling editor key bindings defined in gtk
134 // keyboard theme.
135 scoped_ptr<RenderWidgetHostViewGtkKeyBindings> key_bindings_handler_;
136
129 // Helper class that lets us allocate plugin containers and move them. 137 // Helper class that lets us allocate plugin containers and move them.
130 GtkPluginContainerManager plugin_container_manager_; 138 GtkPluginContainerManager plugin_container_manager_;
131 139
132 // A map of plugin process id -> windows related to that process. 140 // A map of plugin process id -> windows related to that process.
133 // Lets us clean up immediately when a plugin process crashes. 141 // Lets us clean up immediately when a plugin process crashes.
134 typedef std::multimap<base::ProcessId, gfx::PluginWindowHandle> PluginPidMap; 142 typedef std::multimap<base::ProcessId, gfx::PluginWindowHandle> PluginPidMap;
135 PluginPidMap plugin_pid_map_; 143 PluginPidMap plugin_pid_map_;
136 }; 144 };
137 145
138 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_GTK_H_ 146 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_GTK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698