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

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

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

Powered by Google App Engine
This is Rietveld 408576698