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 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_GTK_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_GTK_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_GTK_H_ | 6 #define CONTENT_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 <string> | 10 #include <string> |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 virtual void AcceleratedSurfacePostSubBuffer( | 117 virtual void AcceleratedSurfacePostSubBuffer( |
118 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params, | 118 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params, |
119 int gpu_host_id) OVERRIDE; | 119 int gpu_host_id) OVERRIDE; |
120 virtual void AcceleratedSurfaceSuspend() OVERRIDE; | 120 virtual void AcceleratedSurfaceSuspend() OVERRIDE; |
121 virtual void AcceleratedSurfaceRelease() OVERRIDE; | 121 virtual void AcceleratedSurfaceRelease() OVERRIDE; |
122 virtual bool HasAcceleratedSurface(const gfx::Size& desired_size) OVERRIDE; | 122 virtual bool HasAcceleratedSurface(const gfx::Size& desired_size) OVERRIDE; |
123 virtual void SetHasHorizontalScrollbar( | 123 virtual void SetHasHorizontalScrollbar( |
124 bool has_horizontal_scrollbar) OVERRIDE; | 124 bool has_horizontal_scrollbar) OVERRIDE; |
125 virtual void SetScrollOffsetPinning( | 125 virtual void SetScrollOffsetPinning( |
126 bool is_pinned_to_left, bool is_pinned_to_right) OVERRIDE; | 126 bool is_pinned_to_left, bool is_pinned_to_right) OVERRIDE; |
127 virtual void GetScreenInfo(WebKit::WebScreenInfo* results) OVERRIDE; | 127 virtual void GetScreenInfo(blink::WebScreenInfo* results) OVERRIDE; |
128 virtual gfx::Rect GetBoundsInRootWindow() OVERRIDE; | 128 virtual gfx::Rect GetBoundsInRootWindow() OVERRIDE; |
129 virtual gfx::GLSurfaceHandle GetCompositingSurface() OVERRIDE; | 129 virtual gfx::GLSurfaceHandle GetCompositingSurface() OVERRIDE; |
130 virtual void ResizeCompositingSurface(const gfx::Size&) OVERRIDE; | 130 virtual void ResizeCompositingSurface(const gfx::Size&) OVERRIDE; |
131 virtual bool LockMouse() OVERRIDE; | 131 virtual bool LockMouse() OVERRIDE; |
132 virtual void UnlockMouse() OVERRIDE; | 132 virtual void UnlockMouse() OVERRIDE; |
133 virtual void OnAccessibilityEvents( | 133 virtual void OnAccessibilityEvents( |
134 const std::vector<AccessibilityHostMsg_EventParams>& params) | 134 const std::vector<AccessibilityHostMsg_EventParams>& params) |
135 OVERRIDE; | 135 OVERRIDE; |
136 | 136 |
137 // ActiveWindowWatcherXObserver implementation. | 137 // ActiveWindowWatcherXObserver implementation. |
138 virtual void ActiveWindowChanged(GdkWindow* active_window) OVERRIDE; | 138 virtual void ActiveWindowChanged(GdkWindow* active_window) OVERRIDE; |
139 | 139 |
140 // IPC::Sender implementation: | 140 // IPC::Sender implementation: |
141 virtual bool Send(IPC::Message* message) OVERRIDE; | 141 virtual bool Send(IPC::Message* message) OVERRIDE; |
142 | 142 |
143 // If the widget is aligned with an edge of the monitor its on and the user | 143 // If the widget is aligned with an edge of the monitor its on and the user |
144 // attempts to drag past that edge we track the number of times it has | 144 // attempts to drag past that edge we track the number of times it has |
145 // occurred, so that we can force the widget to scroll when it otherwise | 145 // occurred, so that we can force the widget to scroll when it otherwise |
146 // would be unable to. | 146 // would be unable to. |
147 void ModifyEventForEdgeDragging(GtkWidget* widget, GdkEventMotion* event); | 147 void ModifyEventForEdgeDragging(GtkWidget* widget, GdkEventMotion* event); |
148 | 148 |
149 // Mouse events always provide a movementX/Y which needs to be computed. | 149 // Mouse events always provide a movementX/Y which needs to be computed. |
150 // Also, mouse lock requires knowledge of last unlocked cursor coordinates. | 150 // Also, mouse lock requires knowledge of last unlocked cursor coordinates. |
151 // State is stored on the host view to do this, and the mouse event modified. | 151 // State is stored on the host view to do this, and the mouse event modified. |
152 void ModifyEventMovementAndCoords(WebKit::WebMouseEvent* event); | 152 void ModifyEventMovementAndCoords(blink::WebMouseEvent* event); |
153 | 153 |
154 void Paint(const gfx::Rect&); | 154 void Paint(const gfx::Rect&); |
155 | 155 |
156 // Called by GtkIMContextWrapper to forward a keyboard event to renderer. | 156 // Called by GtkIMContextWrapper to forward a keyboard event to renderer. |
157 // On Linux (not ChromeOS): | 157 // On Linux (not ChromeOS): |
158 // Before calling RenderWidgetHost::ForwardKeyboardEvent(), this method | 158 // Before calling RenderWidgetHost::ForwardKeyboardEvent(), this method |
159 // calls GtkKeyBindingsHandler::Match() against the event and send matched | 159 // calls GtkKeyBindingsHandler::Match() against the event and send matched |
160 // edit commands to renderer by calling | 160 // edit commands to renderer by calling |
161 // RenderWidgetHost::ForwardEditCommandsForNextKeyEvent(). | 161 // RenderWidgetHost::ForwardEditCommandsForNextKeyEvent(). |
162 void ForwardKeyboardEvent(const NativeWebKeyboardEvent& event); | 162 void ForwardKeyboardEvent(const NativeWebKeyboardEvent& event); |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 scoped_ptr<BrowserAccessibilityManager> browser_accessibility_manager_; | 329 scoped_ptr<BrowserAccessibilityManager> browser_accessibility_manager_; |
330 | 330 |
331 ui::GtkSignalRegistrar signals_; | 331 ui::GtkSignalRegistrar signals_; |
332 | 332 |
333 ui::LatencyInfo software_latency_info_; | 333 ui::LatencyInfo software_latency_info_; |
334 }; | 334 }; |
335 | 335 |
336 } // namespace content | 336 } // namespace content |
337 | 337 |
338 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_GTK_H_ | 338 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_GTK_H_ |
OLD | NEW |