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

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

Issue 5961004: Revert 69755 - Move the NPAPI files from webkit/glue/plugins to webkit/plugin... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_GPU_PLUGIN_CONTAINER_MANAGER_MAC_H_ 5 #ifndef CHROME_BROWSER_RENDERER_HOST_GPU_PLUGIN_CONTAINER_MANAGER_MAC_H_
6 #define CHROME_BROWSER_RENDERER_HOST_GPU_PLUGIN_CONTAINER_MANAGER_MAC_H_ 6 #define CHROME_BROWSER_RENDERER_HOST_GPU_PLUGIN_CONTAINER_MANAGER_MAC_H_
7 #pragma once 7 #pragma once
8 8
9 #include <OpenGL/OpenGL.h> 9 #include <OpenGL/OpenGL.h>
10 #include <map> 10 #include <map>
11 11
12 #include "app/surface/transport_dib.h" 12 #include "app/surface/transport_dib.h"
13 #include "base/basictypes.h" 13 #include "base/basictypes.h"
14 #include "base/lock.h" 14 #include "base/lock.h"
15 #include "gfx/native_widget_types.h" 15 #include "gfx/native_widget_types.h"
16 16
17 namespace webkit { 17 namespace webkit_glue {
18 namespace npapi {
19 struct WebPluginGeometry; 18 struct WebPluginGeometry;
20 } 19 }
21 }
22 20
23 class AcceleratedSurfaceContainerMac; 21 class AcceleratedSurfaceContainerMac;
24 22
25 // Helper class that manages the backing store and on-screen rendering 23 // Helper class that manages the backing store and on-screen rendering
26 // of instances of the GPU plugin on the Mac. 24 // of instances of the GPU plugin on the Mac.
27 class AcceleratedSurfaceContainerManagerMac { 25 class AcceleratedSurfaceContainerManagerMac {
28 public: 26 public:
29 AcceleratedSurfaceContainerManagerMac(); 27 AcceleratedSurfaceContainerManagerMac();
30 28
31 // Allocates a new "fake" PluginWindowHandle, which is used as the 29 // Allocates a new "fake" PluginWindowHandle, which is used as the
(...skipping 26 matching lines...) Expand all
58 int32 width, 56 int32 width,
59 int32 height, 57 int32 height,
60 uint64 io_surface_identifier); 58 uint64 io_surface_identifier);
61 void SetSizeAndTransportDIB(gfx::PluginWindowHandle id, 59 void SetSizeAndTransportDIB(gfx::PluginWindowHandle id,
62 int32 width, 60 int32 width,
63 int32 height, 61 int32 height,
64 TransportDIB::Handle transport_dib); 62 TransportDIB::Handle transport_dib);
65 63
66 // Takes an update from WebKit about a plugin's position and size and moves 64 // Takes an update from WebKit about a plugin's position and size and moves
67 // the plugin accordingly. 65 // the plugin accordingly.
68 void SetPluginContainerGeometry( 66 void SetPluginContainerGeometry(const webkit_glue::WebPluginGeometry& move);
69 const webkit::npapi::WebPluginGeometry& move);
70 67
71 // Draws the plugin container associated with the given id into the given 68 // Draws the plugin container associated with the given id into the given
72 // OpenGL context, which must already be current. 69 // OpenGL context, which must already be current.
73 void Draw(CGLContextObj context, gfx::PluginWindowHandle id); 70 void Draw(CGLContextObj context, gfx::PluginWindowHandle id);
74 71
75 // Causes the next Draw call on each container to trigger a texture upload. 72 // Causes the next Draw call on each container to trigger a texture upload.
76 // Should be called any time the drawing context has changed. 73 // Should be called any time the drawing context has changed.
77 void ForceTextureReload(); 74 void ForceTextureReload();
78 75
79 // Notifies a surface that it has been painted to. 76 // Notifies a surface that it has been painted to.
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 // Both |plugin_window_to_container_map_| and the 113 // Both |plugin_window_to_container_map_| and the
117 // AcceleratedSurfaceContainerMac in it are not threadsafe, but accessed from 114 // AcceleratedSurfaceContainerMac in it are not threadsafe, but accessed from
118 // multiple threads. All these accesses are guarded by this lock. 115 // multiple threads. All these accesses are guarded by this lock.
119 mutable Lock lock_; 116 mutable Lock lock_;
120 117
121 DISALLOW_COPY_AND_ASSIGN(AcceleratedSurfaceContainerManagerMac); 118 DISALLOW_COPY_AND_ASSIGN(AcceleratedSurfaceContainerManagerMac);
122 }; 119 };
123 120
124 #endif // CHROME_BROWSER_RENDERER_HOST_GPU_PLUGIN_CONTAINER_MANAGER_MAC_H_ 121 #endif // CHROME_BROWSER_RENDERER_HOST_GPU_PLUGIN_CONTAINER_MANAGER_MAC_H_
125 122
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698