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

Side by Side Diff: content/plugin/webplugin_proxy.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
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 CONTENT_PLUGIN_WEBPLUGIN_PROXY_H_ 5 #ifndef CONTENT_PLUGIN_WEBPLUGIN_PROXY_H_
6 #define CONTENT_PLUGIN_WEBPLUGIN_PROXY_H_ 6 #define CONTENT_PLUGIN_WEBPLUGIN_PROXY_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/hash_tables.h" 11 #include "base/hash_tables.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #if defined(OS_MACOSX) 13 #if defined(OS_MACOSX)
14 #include "base/mac/scoped_cftyperef.h" 14 #include "base/mac/scoped_cftyperef.h"
15 #endif 15 #endif
16 #include "base/memory/scoped_handle.h" 16 #include "base/memory/scoped_handle.h"
17 #include "base/memory/scoped_ptr.h" 17 #include "base/memory/scoped_ptr.h"
18 #include "base/shared_memory.h" 18 #include "base/shared_memory.h"
19 #include "base/timer.h" 19 #include "base/timer.h"
20 #include "googleurl/src/gurl.h" 20 #include "googleurl/src/gurl.h"
21 #include "ipc/ipc_message.h" 21 #include "ipc/ipc_message.h"
22 #if defined(USE_X11) 22 #if defined(USE_X11)
23 #include "ui/base/x/x11_util.h" 23 #include "ui/base/x/x11_util.h"
24 #endif 24 #endif
25 #include "ui/gfx/gl/gpu_preference.h"
25 #include "ui/gfx/surface/transport_dib.h" 26 #include "ui/gfx/surface/transport_dib.h"
26 #include "webkit/plugins/npapi/webplugin.h" 27 #include "webkit/plugins/npapi/webplugin.h"
27 28
28 class PluginChannel; 29 class PluginChannel;
29 30
30 namespace skia { 31 namespace skia {
31 class PlatformCanvas; 32 class PlatformCanvas;
32 } 33 }
33 34
34 namespace webkit { 35 namespace webkit {
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 webkit::npapi::WebPluginResourceClient* resource_client); 129 webkit::npapi::WebPluginResourceClient* resource_client);
129 gfx::NativeViewId containing_window() { return containing_window_; } 130 gfx::NativeViewId containing_window() { return containing_window_; }
130 131
131 #if defined(OS_MACOSX) 132 #if defined(OS_MACOSX)
132 virtual void FocusChanged(bool focused); 133 virtual void FocusChanged(bool focused);
133 134
134 virtual void StartIme(); 135 virtual void StartIme();
135 136
136 virtual void BindFakePluginWindowHandle(bool opaque); 137 virtual void BindFakePluginWindowHandle(bool opaque);
137 138
138 virtual webkit::npapi::WebPluginAcceleratedSurface* GetAcceleratedSurface(); 139 virtual webkit::npapi::WebPluginAcceleratedSurface*
140 GetAcceleratedSurface(gfx::GpuPreference gpu_preference);
139 141
140 // Tell the browser (via the renderer) to invalidate because the 142 // Tell the browser (via the renderer) to invalidate because the
141 // accelerated buffers have changed. 143 // accelerated buffers have changed.
142 virtual void AcceleratedFrameBuffersDidSwap( 144 virtual void AcceleratedFrameBuffersDidSwap(
143 gfx::PluginWindowHandle window, uint64 surface_id); 145 gfx::PluginWindowHandle window, uint64 surface_id);
144 146
145 // Tell the renderer and browser to associate the given plugin handle with 147 // Tell the renderer and browser to associate the given plugin handle with
146 // |accelerated_surface_identifier|. The geometry is used to resize any 148 // |accelerated_surface_identifier|. The geometry is used to resize any
147 // native "window" (which on the Mac is a just a view). 149 // native "window" (which on the Mac is a just a view).
148 // This method is used when IOSurface support is available. 150 // This method is used when IOSurface support is available.
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 273
272 #endif 274 #endif
273 275
274 // Contains the routing id of the host render view. 276 // Contains the routing id of the host render view.
275 int host_render_view_routing_id_; 277 int host_render_view_routing_id_;
276 278
277 ScopedRunnableMethodFactory<WebPluginProxy> runnable_method_factory_; 279 ScopedRunnableMethodFactory<WebPluginProxy> runnable_method_factory_;
278 }; 280 };
279 281
280 #endif // CONTENT_PLUGIN_WEBPLUGIN_PROXY_H_ 282 #endif // CONTENT_PLUGIN_WEBPLUGIN_PROXY_H_
OLDNEW
« no previous file with comments | « content/plugin/webplugin_accelerated_surface_proxy_mac.cc ('k') | content/plugin/webplugin_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698