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

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

Issue 160577: Cleanup GtkIMContext related code by splitting it into separated source file. (Closed) Base URL: svn://svn.chromium.org/chrome/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
10 #include <map>
9 #include <vector> 11 #include <vector>
12 #include <string>
10 13
11 #include "base/gfx/native_widget_types.h" 14 #include "base/gfx/native_widget_types.h"
12 #include "base/scoped_ptr.h" 15 #include "base/scoped_ptr.h"
13 #include "chrome/browser/renderer_host/render_widget_host_view.h" 16 #include "chrome/browser/renderer_host/render_widget_host_view.h"
14 #include "chrome/common/owned_widget_gtk.h" 17 #include "chrome/common/owned_widget_gtk.h"
15 #include "chrome/common/render_messages.h" 18 #include "chrome/common/render_messages.h"
16 #include "webkit/glue/plugins/gtk_plugin_container_manager.h" 19 #include "webkit/glue/plugins/gtk_plugin_container_manager.h"
17 #include "webkit/glue/webcursor.h" 20 #include "webkit/glue/webcursor.h"
18 21
19 class RenderWidgetHost; 22 class RenderWidgetHost;
20 // A conveience wrapper class for GtkIMContext; 23 // A conveience wrapper class for GtkIMContext;
21 class RenderWidgetHostViewGtkIMContext; 24 class GtkIMContextWrapper;
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;
26 28
27 // ----------------------------------------------------------------------------- 29 // -----------------------------------------------------------------------------
28 // See comments in render_widget_host_view.h about this class and its members. 30 // See comments in render_widget_host_view.h about this class and its members.
29 // ----------------------------------------------------------------------------- 31 // -----------------------------------------------------------------------------
30 class RenderWidgetHostViewGtk : public RenderWidgetHostView { 32 class RenderWidgetHostViewGtk : public RenderWidgetHostView {
31 public: 33 public:
32 RenderWidgetHostViewGtk(RenderWidgetHost* widget); 34 explicit RenderWidgetHostViewGtk(RenderWidgetHost* widget);
33 ~RenderWidgetHostViewGtk(); 35 ~RenderWidgetHostViewGtk();
34 36
35 // Initialize this object for use as a drawing area. 37 // Initialize this object for use as a drawing area.
36 void InitAsChild(); 38 void InitAsChild();
37 39
38 // RenderWidgetHostView implementation. 40 // RenderWidgetHostView implementation.
39 virtual void InitAsPopup(RenderWidgetHostView* parent_host_view, 41 virtual void InitAsPopup(RenderWidgetHostView* parent_host_view,
40 const gfx::Rect& pos); 42 const gfx::Rect& pos);
41 virtual RenderWidgetHost* GetRenderWidgetHost() const { return host_; } 43 virtual RenderWidgetHost* GetRenderWidgetHost() const { return host_; }
42 virtual void DidBecomeSelected(); 44 virtual void DidBecomeSelected();
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 GtkWidget* parent_; 119 GtkWidget* parent_;
118 // We ignore the first mouse release on popups. This allows the popup to 120 // We ignore the first mouse release on popups. This allows the popup to
119 // stay open. 121 // stay open.
120 bool is_popup_first_mouse_release_; 122 bool is_popup_first_mouse_release_;
121 123
122 // Whether or not this widget was focused before shadowed by another widget. 124 // Whether or not this widget was focused before shadowed by another widget.
123 // Used in OnGrabNotify() handler to track the focused state correctly. 125 // Used in OnGrabNotify() handler to track the focused state correctly.
124 bool was_focused_before_grab_; 126 bool was_focused_before_grab_;
125 127
126 // A conveience wrapper object for GtkIMContext; 128 // A conveience wrapper object for GtkIMContext;
127 scoped_ptr<RenderWidgetHostViewGtkIMContext> im_context_; 129 scoped_ptr<GtkIMContextWrapper> im_context_;
128 130
129 // Helper class that lets us allocate plugin containers and move them. 131 // Helper class that lets us allocate plugin containers and move them.
130 GtkPluginContainerManager plugin_container_manager_; 132 GtkPluginContainerManager plugin_container_manager_;
131 133
132 // A map of plugin process id -> windows related to that process. 134 // A map of plugin process id -> windows related to that process.
133 // Lets us clean up immediately when a plugin process crashes. 135 // Lets us clean up immediately when a plugin process crashes.
134 typedef std::multimap<base::ProcessId, gfx::PluginWindowHandle> PluginPidMap; 136 typedef std::multimap<base::ProcessId, gfx::PluginWindowHandle> PluginPidMap;
135 PluginPidMap plugin_pid_map_; 137 PluginPidMap plugin_pid_map_;
136 }; 138 };
137 139
138 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_GTK_H_ 140 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_GTK_H_
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/gtk_im_context_wrapper.cc ('k') | chrome/browser/renderer_host/render_widget_host_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698