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

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

Issue 10735010: 3D Compositing in <browser>, first draft. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 5 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
OLDNEW
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 #pragma once 7 #pragma once
8 8
9 #include <gdk/gdk.h> 9 #include <gdk/gdk.h>
10 10
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 size_t offset, 97 size_t offset,
98 const ui::Range& range) OVERRIDE; 98 const ui::Range& range) OVERRIDE;
99 virtual void SelectionBoundsChanged(const gfx::Rect& start_rect, 99 virtual void SelectionBoundsChanged(const gfx::Rect& start_rect,
100 const gfx::Rect& end_rect) OVERRIDE; 100 const gfx::Rect& end_rect) OVERRIDE;
101 virtual BackingStore* AllocBackingStore(const gfx::Size& size) OVERRIDE; 101 virtual BackingStore* AllocBackingStore(const gfx::Size& size) OVERRIDE;
102 virtual void CopyFromCompositingSurface( 102 virtual void CopyFromCompositingSurface(
103 const gfx::Size& size, 103 const gfx::Size& size,
104 skia::PlatformCanvas* output, 104 skia::PlatformCanvas* output,
105 base::Callback<void(bool)> callback) OVERRIDE; 105 base::Callback<void(bool)> callback) OVERRIDE;
106 virtual void OnAcceleratedCompositingStateChange() OVERRIDE; 106 virtual void OnAcceleratedCompositingStateChange() OVERRIDE;
107 virtual void AcceleratedSurfaceBuffersSwapped(
108 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params,
109 int gpu_host_id) OVERRIDE;
110 virtual void AcceleratedSurfacePostSubBuffer(
111 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params,
112 int gpu_host_id) OVERRIDE;
113 virtual void AcceleratedSurfaceSuspend() OVERRIDE; 107 virtual void AcceleratedSurfaceSuspend() OVERRIDE;
114 virtual bool HasAcceleratedSurface(const gfx::Size& desired_size) OVERRIDE; 108 virtual bool HasAcceleratedSurface(const gfx::Size& desired_size) OVERRIDE;
115 virtual void CreatePluginContainer(gfx::PluginWindowHandle id) OVERRIDE; 109 virtual void CreatePluginContainer(gfx::PluginWindowHandle id) OVERRIDE;
116 virtual void DestroyPluginContainer(gfx::PluginWindowHandle id) OVERRIDE; 110 virtual void DestroyPluginContainer(gfx::PluginWindowHandle id) OVERRIDE;
117 virtual void ProcessTouchAck(WebKit::WebInputEvent::Type type, 111 virtual void ProcessTouchAck(WebKit::WebInputEvent::Type type,
118 bool processed) OVERRIDE; 112 bool processed) OVERRIDE;
119 virtual void SetHasHorizontalScrollbar( 113 virtual void SetHasHorizontalScrollbar(
120 bool has_horizontal_scrollbar) OVERRIDE; 114 bool has_horizontal_scrollbar) OVERRIDE;
121 virtual void SetScrollOffsetPinning( 115 virtual void SetScrollOffsetPinning(
122 bool is_pinned_to_left, bool is_pinned_to_right) OVERRIDE; 116 bool is_pinned_to_left, bool is_pinned_to_right) OVERRIDE;
123 virtual void GetScreenInfo(WebKit::WebScreenInfo* results) OVERRIDE; 117 virtual void GetScreenInfo(WebKit::WebScreenInfo* results) OVERRIDE;
124 virtual gfx::Rect GetRootWindowBounds() OVERRIDE; 118 virtual gfx::Rect GetRootWindowBounds() OVERRIDE;
125 virtual gfx::GLSurfaceHandle GetCompositingSurface() OVERRIDE;
126 virtual bool LockMouse() OVERRIDE; 119 virtual bool LockMouse() OVERRIDE;
127 virtual void UnlockMouse() OVERRIDE; 120 virtual void UnlockMouse() OVERRIDE;
128 virtual void OnAccessibilityNotifications( 121 virtual void OnAccessibilityNotifications(
129 const std::vector<AccessibilityHostMsg_NotificationParams>& params) 122 const std::vector<AccessibilityHostMsg_NotificationParams>& params)
130 OVERRIDE; 123 OVERRIDE;
131 124
132 // ActiveWindowWatcherXObserver implementation. 125 // ActiveWindowWatcherXObserver implementation.
133 virtual void ActiveWindowChanged(GdkWindow* active_window) OVERRIDE; 126 virtual void ActiveWindowChanged(GdkWindow* active_window) OVERRIDE;
134 127
135 // If the widget is aligned with an edge of the monitor its on and the user 128 // If the widget is aligned with an edge of the monitor its on and the user
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 302
310 // The event for the last mouse down we handled. We need this for context 303 // The event for the last mouse down we handled. We need this for context
311 // menus and drags. 304 // menus and drags.
312 GdkEventButton* last_mouse_down_; 305 GdkEventButton* last_mouse_down_;
313 306
314 // Instance of accessibility information for the root of the AtkObject 307 // Instance of accessibility information for the root of the AtkObject
315 // tree representation of the WebKit render tree. 308 // tree representation of the WebKit render tree.
316 scoped_ptr<BrowserAccessibilityManager> browser_accessibility_manager_; 309 scoped_ptr<BrowserAccessibilityManager> browser_accessibility_manager_;
317 310
318 ui::GtkSignalRegistrar signals_; 311 ui::GtkSignalRegistrar signals_;
312
313 class CompositingDelegateGtk : public CompositingDelegate {
314 public:
315 virtual gfx::GLSurfaceHandle GetCompositingSurface() OVERRIDE;
316 virtual bool ResizeNeedsNewSurface() OVERRIDE;
317
318 virtual void AcceleratedSurfaceBuffersSwapped(
319 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params,
320 int gpu_host_id) OVERRIDE;
321 virtual void AcceleratedSurfacePostSubBuffer(
322 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params,
323 int gpu_host_id) OVERRIDE;
324
325 private:
326 friend class RenderWidgetHostViewGtk;
327 CompositingDelegateGtk(RenderWidgetHostViewGtk* view)
328 : view_(view)
329 {}
330 RenderWidgetHostViewGtk* view_;
331 };
319 }; 332 };
320 333
321 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_GTK_H_ 334 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_GTK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698