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

Side by Side Diff: webkit/glue/plugins/webplugin_delegate_impl.h

Issue 558035: [GPU] Get GPU process running on the mac... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 10 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/glue/plugins/mac_gpu_plugin_container_manager.cc ('k') | webkit/glue/webplugin.h » ('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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_GLUE_PLUGIN_WEBPLUGIN_DELEGATE_IMPL_H_ 5 #ifndef WEBKIT_GLUE_PLUGIN_WEBPLUGIN_DELEGATE_IMPL_H_
6 #define WEBKIT_GLUE_PLUGIN_WEBPLUGIN_DELEGATE_IMPL_H_ 6 #define WEBKIT_GLUE_PLUGIN_WEBPLUGIN_DELEGATE_IMPL_H_
7 7
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 9
10 #include <string> 10 #include <string>
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 void SetCursor(const Cursor* cursor); 140 void SetCursor(const Cursor* cursor);
141 // Informs the delegate that the plugin set a Cocoa NSCursor. 141 // Informs the delegate that the plugin set a Cocoa NSCursor.
142 void SetNSCursor(NSCursor* cursor); 142 void SetNSCursor(NSCursor* cursor);
143 143
144 #ifndef NP_NO_CARBON 144 #ifndef NP_NO_CARBON
145 // Indicates that it's time to send the plugin a null event. 145 // Indicates that it's time to send the plugin a null event.
146 void FireIdleEvent(); 146 void FireIdleEvent();
147 #endif 147 #endif
148 #endif // OS_MACOSX 148 #endif // OS_MACOSX
149 149
150 #if !defined(OS_MACOSX)
151 gfx::PluginWindowHandle windowed_handle() const { 150 gfx::PluginWindowHandle windowed_handle() const {
152 return windowed_handle_; 151 return windowed_handle_;
153 } 152 }
153
154 #if defined(OS_MACOSX)
155 // On Mac OS X and for the GPU plugin only, this handle is a fake
156 // one and comes in from the outside world.
157 void set_windowed_handle(gfx::PluginWindowHandle handle) {
158 windowed_handle_ = handle;
159 }
154 #endif 160 #endif
155 161
156 private: 162 private:
157 friend class DeleteTask<WebPluginDelegateImpl>; 163 friend class DeleteTask<WebPluginDelegateImpl>;
158 friend class webkit_glue::WebPluginDelegate; 164 friend class webkit_glue::WebPluginDelegate;
159 165
160 WebPluginDelegateImpl(gfx::PluginWindowHandle containing_view, 166 WebPluginDelegateImpl(gfx::PluginWindowHandle containing_view,
161 NPAPI::PluginInstance *instance); 167 NPAPI::PluginInstance *instance);
162 ~WebPluginDelegateImpl(); 168 ~WebPluginDelegateImpl();
163 169
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 void WindowlessSetWindow(bool force_set_window); 224 void WindowlessSetWindow(bool force_set_window);
219 225
220 //----------------------------------------- 226 //-----------------------------------------
221 // used for windowed and windowless plugins 227 // used for windowed and windowless plugins
222 228
223 NPAPI::PluginInstance* instance() { return instance_.get(); } 229 NPAPI::PluginInstance* instance() { return instance_.get(); }
224 230
225 // Closes down and destroys our plugin instance. 231 // Closes down and destroys our plugin instance.
226 void DestroyInstance(); 232 void DestroyInstance();
227 233
228 #if !defined(OS_MACOSX) 234
229 // used for windowed plugins 235 // used for windowed plugins
236 // Note: on Mac OS X, the only time the windowed handle is non-zero
237 // is the case of the GPU plugin, which uses a fake window handle to
238 // identify itself back to the browser. It still performs all of its
239 // work offscreen.
230 gfx::PluginWindowHandle windowed_handle_; 240 gfx::PluginWindowHandle windowed_handle_;
231 gfx::Rect windowed_last_pos_; 241 gfx::Rect windowed_last_pos_;
232 #endif 242
233 bool windowed_did_set_window_; 243 bool windowed_did_set_window_;
234 244
235 // TODO(dglazkov): No longer used by Windows, make sure the removal 245 // TODO(dglazkov): No longer used by Windows, make sure the removal
236 // causes no regressions and eliminate from other platforms. 246 // causes no regressions and eliminate from other platforms.
237 // this is an optimization to avoid calling SetWindow to the plugin 247 // this is an optimization to avoid calling SetWindow to the plugin
238 // when it is not necessary. Initially, we need to call SetWindow, 248 // when it is not necessary. Initially, we need to call SetWindow,
239 // and after that we only need to call it when the geometry changes. 249 // and after that we only need to call it when the geometry changes.
240 // use this flag to indicate whether we really need it or not. 250 // use this flag to indicate whether we really need it or not.
241 bool windowless_needs_set_window_; 251 bool windowless_needs_set_window_;
242 252
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 ScopedRunnableMethodFactory<WebPluginDelegateImpl> user_gesture_msg_factory_; 409 ScopedRunnableMethodFactory<WebPluginDelegateImpl> user_gesture_msg_factory_;
400 #endif 410 #endif
401 411
402 // Holds the current cursor set by the windowless plugin. 412 // Holds the current cursor set by the windowless plugin.
403 WebCursor current_windowless_cursor_; 413 WebCursor current_windowless_cursor_;
404 414
405 DISALLOW_COPY_AND_ASSIGN(WebPluginDelegateImpl); 415 DISALLOW_COPY_AND_ASSIGN(WebPluginDelegateImpl);
406 }; 416 };
407 417
408 #endif // WEBKIT_GLUE_PLUGIN_WEBPLUGIN_DELEGATE_IMPL_H_ 418 #endif // WEBKIT_GLUE_PLUGIN_WEBPLUGIN_DELEGATE_IMPL_H_
OLDNEW
« no previous file with comments | « webkit/glue/plugins/mac_gpu_plugin_container_manager.cc ('k') | webkit/glue/webplugin.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698