| OLD | NEW |
| 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 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 virtual gfx::Rect GetViewBounds() const; | 54 virtual gfx::Rect GetViewBounds() const; |
| 55 virtual void UpdateCursor(const WebCursor& cursor); | 55 virtual void UpdateCursor(const WebCursor& cursor); |
| 56 virtual void SetIsLoading(bool is_loading); | 56 virtual void SetIsLoading(bool is_loading); |
| 57 virtual void IMEUpdateStatus(int control, const gfx::Rect& caret_rect); | 57 virtual void IMEUpdateStatus(int control, const gfx::Rect& caret_rect); |
| 58 virtual void DidPaintRect(const gfx::Rect& rect); | 58 virtual void DidPaintRect(const gfx::Rect& rect); |
| 59 virtual void DidScrollRect(const gfx::Rect& rect, int dx, int dy); | 59 virtual void DidScrollRect(const gfx::Rect& rect, int dx, int dy); |
| 60 virtual void RenderViewGone(); | 60 virtual void RenderViewGone(); |
| 61 virtual void Destroy(); | 61 virtual void Destroy(); |
| 62 virtual void SetTooltipText(const std::wstring& tooltip_text); | 62 virtual void SetTooltipText(const std::wstring& tooltip_text); |
| 63 virtual void SelectionChanged(const std::string& text); | 63 virtual void SelectionChanged(const std::string& text); |
| 64 virtual void PasteFromSelectionClipboard(); | |
| 65 virtual void ShowingContextMenu(bool showing); | 64 virtual void ShowingContextMenu(bool showing); |
| 66 virtual BackingStore* AllocBackingStore(const gfx::Size& size); | 65 virtual BackingStore* AllocBackingStore(const gfx::Size& size); |
| 67 virtual void SetBackground(const SkBitmap& background); | 66 virtual void SetBackground(const SkBitmap& background); |
| 68 virtual void CreatePluginContainer(gfx::PluginWindowHandle id); | 67 virtual void CreatePluginContainer(gfx::PluginWindowHandle id); |
| 69 virtual void DestroyPluginContainer(gfx::PluginWindowHandle id); | 68 virtual void DestroyPluginContainer(gfx::PluginWindowHandle id); |
| 70 | 69 |
| 71 gfx::NativeView native_view() const { return view_.get(); } | 70 gfx::NativeView native_view() const { return view_.get(); } |
| 72 | 71 |
| 73 void Paint(const gfx::Rect&); | 72 void Paint(const gfx::Rect&); |
| 74 | 73 |
| 75 private: | 74 private: |
| 76 friend class RenderWidgetHostViewGtkWidget; | 75 friend class RenderWidgetHostViewGtkWidget; |
| 77 | 76 |
| 78 // Update the display cursor for the render view. | 77 // Update the display cursor for the render view. |
| 79 void ShowCurrentCursor(); | 78 void ShowCurrentCursor(); |
| 80 | 79 |
| 81 // When we've requested the text from the X clipboard, GTK returns it to us | |
| 82 // through this callback. | |
| 83 static void ReceivedSelectionText(GtkClipboard* clipboard, | |
| 84 const gchar* text, | |
| 85 gpointer userdata); | |
| 86 | |
| 87 // The model object. | 80 // The model object. |
| 88 RenderWidgetHost* const host_; | 81 RenderWidgetHost* const host_; |
| 89 | 82 |
| 90 // The native UI widget. | 83 // The native UI widget. |
| 91 OwnedWidgetGtk view_; | 84 OwnedWidgetGtk view_; |
| 92 | 85 |
| 93 // This is true when we are currently painting and thus should handle extra | 86 // This is true when we are currently painting and thus should handle extra |
| 94 // paint requests by expanding the invalid rect rather than actually | 87 // paint requests by expanding the invalid rect rather than actually |
| 95 // painting. | 88 // painting. |
| 96 bool about_to_validate_and_paint_; | 89 bool about_to_validate_and_paint_; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 124 bool was_focused_before_grab_; | 117 bool was_focused_before_grab_; |
| 125 | 118 |
| 126 // A conveience wrapper object for GtkIMContext; | 119 // A conveience wrapper object for GtkIMContext; |
| 127 scoped_ptr<GtkIMContextWrapper> im_context_; | 120 scoped_ptr<GtkIMContextWrapper> im_context_; |
| 128 | 121 |
| 129 // Helper class that lets us allocate plugin containers and move them. | 122 // Helper class that lets us allocate plugin containers and move them. |
| 130 GtkPluginContainerManager plugin_container_manager_; | 123 GtkPluginContainerManager plugin_container_manager_; |
| 131 }; | 124 }; |
| 132 | 125 |
| 133 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_GTK_H_ | 126 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_GTK_H_ |
| OLD | NEW |