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

Side by Side Diff: webkit/plugins/npapi/webplugin.h

Issue 8233027: Support dynamic switching between integrated and discrete GPUs on Mac OS X. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « webkit/gpu/webgraphicscontext3d_in_process_impl.cc ('k') | webkit/plugins/npapi/webplugin.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_H_ 5 #ifndef WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_H_
6 #define WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_H_ 6 #define WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "ui/gfx/gl/gpu_preference.h"
12 #include "ui/gfx/native_widget_types.h" 13 #include "ui/gfx/native_widget_types.h"
13 #include "ui/gfx/rect.h" 14 #include "ui/gfx/rect.h"
14 15
15 // TODO(port): this typedef is obviously incorrect on non-Windows 16 // TODO(port): this typedef is obviously incorrect on non-Windows
16 // platforms, but now a lot of code now accidentally depends on them 17 // platforms, but now a lot of code now accidentally depends on them
17 // existing. #ifdef out these declarations and fix all the users. 18 // existing. #ifdef out these declarations and fix all the users.
18 typedef void* HANDLE; 19 typedef void* HANDLE;
19 20
20 class GURL; 21 class GURL;
21 struct NPObject; 22 struct NPObject;
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 153
153 // Synthesize a fake window handle for the plug-in to identify the instance 154 // Synthesize a fake window handle for the plug-in to identify the instance
154 // to the browser, allowing mapping to a surface for hardware accelleration 155 // to the browser, allowing mapping to a surface for hardware accelleration
155 // of plug-in content. The browser generates the handle which is then set on 156 // of plug-in content. The browser generates the handle which is then set on
156 // the plug-in. |opaque| indicates whether the content should be treated as 157 // the plug-in. |opaque| indicates whether the content should be treated as
157 // opaque or translucent. 158 // opaque or translucent.
158 // TODO(stuartmorgan): Move this into WebPluginProxy. 159 // TODO(stuartmorgan): Move this into WebPluginProxy.
159 virtual void BindFakePluginWindowHandle(bool opaque) {} 160 virtual void BindFakePluginWindowHandle(bool opaque) {}
160 161
161 // Returns the accelerated surface abstraction for accelerated plugins. 162 // Returns the accelerated surface abstraction for accelerated plugins.
162 virtual WebPluginAcceleratedSurface* GetAcceleratedSurface(); 163 virtual WebPluginAcceleratedSurface* GetAcceleratedSurface(
164 gfx::GpuPreference gpu_preference);
163 #endif 165 #endif
164 166
165 // Handles NPN_URLRedirectResponse calls issued by plugins in response to 167 // Handles NPN_URLRedirectResponse calls issued by plugins in response to
166 // HTTP URL redirect notifications. 168 // HTTP URL redirect notifications.
167 virtual void URLRedirectResponse(bool allow, int resource_id) = 0; 169 virtual void URLRedirectResponse(bool allow, int resource_id) = 0;
168 }; 170 };
169 171
170 // Simpler version of ResourceHandleClient that lends itself to proxying. 172 // Simpler version of ResourceHandleClient that lends itself to proxying.
171 class WebPluginResourceClient { 173 class WebPluginResourceClient {
172 public: 174 public:
(...skipping 11 matching lines...) Expand all
184 virtual void DidFinishLoading() = 0; 186 virtual void DidFinishLoading() = 0;
185 virtual void DidFail() = 0; 187 virtual void DidFail() = 0;
186 virtual bool IsMultiByteResponseExpected() = 0; 188 virtual bool IsMultiByteResponseExpected() = 0;
187 virtual int ResourceId() = 0; 189 virtual int ResourceId() = 0;
188 }; 190 };
189 191
190 } // namespace npapi 192 } // namespace npapi
191 } // namespace webkit 193 } // namespace webkit
192 194
193 #endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_H_ 195 #endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_H_
OLDNEW
« no previous file with comments | « webkit/gpu/webgraphicscontext3d_in_process_impl.cc ('k') | webkit/plugins/npapi/webplugin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698