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

Side by Side Diff: webkit/plugins/ppapi/ppapi_plugin_instance.h

Issue 7538006: Pepper and WebKit API change to support a plugin knowing if a scrollbar is an overlay one. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Get rid of ScrollbarGroup's methods and the ResizeClient interface Created 9 years, 4 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 WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_
6 #define WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ 6 #define WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 65
66 class FullscreenContainer; 66 class FullscreenContainer;
67 class MessageChannel; 67 class MessageChannel;
68 class ObjectVar; 68 class ObjectVar;
69 class PluginDelegate; 69 class PluginDelegate;
70 class PluginModule; 70 class PluginModule;
71 class PluginObject; 71 class PluginObject;
72 class PPB_Graphics2D_Impl; 72 class PPB_Graphics2D_Impl;
73 class PPB_Graphics3D_Impl; 73 class PPB_Graphics3D_Impl;
74 class PPB_ImageData_Impl; 74 class PPB_ImageData_Impl;
75 class PPB_ScrollbarGroup_Impl;
75 class PPB_Surface3D_Impl; 76 class PPB_Surface3D_Impl;
76 class PPB_URLLoader_Impl; 77 class PPB_URLLoader_Impl;
77 class PPB_URLRequestInfo_Impl; 78 class PPB_URLRequestInfo_Impl;
78 class Resource; 79 class Resource;
79 80
80 // Represents one time a plugin appears on one web page. 81 // Represents one time a plugin appears on one web page.
81 // 82 //
82 // Note: to get from a PP_Instance to a PluginInstance*, use the 83 // Note: to get from a PP_Instance to a PluginInstance*, use the
83 // ResourceTracker. 84 // ResourceTracker.
84 class PluginInstance : public base::RefCounted<PluginInstance>, 85 class PluginInstance : public base::RefCounted<PluginInstance>,
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 void RemovePluginObject(PluginObject* plugin_object); 193 void RemovePluginObject(PluginObject* plugin_object);
193 194
194 string16 GetSelectedText(bool html); 195 string16 GetSelectedText(bool html);
195 string16 GetLinkAtPosition(const gfx::Point& point); 196 string16 GetLinkAtPosition(const gfx::Point& point);
196 void Zoom(double factor, bool text_only); 197 void Zoom(double factor, bool text_only);
197 bool StartFind(const string16& search_text, 198 bool StartFind(const string16& search_text,
198 bool case_sensitive, 199 bool case_sensitive,
199 int identifier); 200 int identifier);
200 void SelectFindResult(bool forward); 201 void SelectFindResult(bool forward);
201 void StopFind(); 202 void StopFind();
203 void WillStartLiveResize();
204 void WillEndLiveResize();
202 205
203 bool SupportsPrintInterface(); 206 bool SupportsPrintInterface();
204 int PrintBegin(const gfx::Rect& printable_area, int printer_dpi); 207 int PrintBegin(const gfx::Rect& printable_area, int printer_dpi);
205 bool PrintPage(int page_number, WebKit::WebCanvas* canvas); 208 bool PrintPage(int page_number, WebKit::WebCanvas* canvas);
206 void PrintEnd(); 209 void PrintEnd();
207 210
208 void Graphics3DContextLost(); 211 void Graphics3DContextLost();
209 212
210 // Implementation of PPB_Fullscreen_Dev. 213 // Implementation of PPB_Fullscreen_Dev.
211 214
(...skipping 27 matching lines...) Expand all
239 PluginDelegate::PlatformContext3D* CreateContext3D(); 242 PluginDelegate::PlatformContext3D* CreateContext3D();
240 243
241 // Returns true iff the plugin is a full-page plugin (i.e. not in an iframe or 244 // Returns true iff the plugin is a full-page plugin (i.e. not in an iframe or
242 // embedded in a page). 245 // embedded in a page).
243 bool IsFullPagePlugin() const; 246 bool IsFullPagePlugin() const;
244 247
245 FullscreenContainer* fullscreen_container() const { 248 FullscreenContainer* fullscreen_container() const {
246 return fullscreen_container_; 249 return fullscreen_container_;
247 } 250 }
248 251
252 // Callback to associate a full-frame instance's scrollgroup object.
253 void SetScrollbarGroup(PPB_ScrollbarGroup_Impl* scrollbar_group);
254
249 // FunctionGroupBase overrides. 255 // FunctionGroupBase overrides.
250 virtual ::ppapi::thunk::PPB_Instance_FunctionAPI* AsPPB_Instance_FunctionAPI() 256 virtual ::ppapi::thunk::PPB_Instance_FunctionAPI* AsPPB_Instance_FunctionAPI()
251 OVERRIDE; 257 OVERRIDE;
252 258
253 // PPB_Instance_API implementation. 259 // PPB_Instance_API implementation.
254 virtual PP_Bool BindGraphics(PP_Instance instance, 260 virtual PP_Bool BindGraphics(PP_Instance instance,
255 PP_Resource device) OVERRIDE; 261 PP_Resource device) OVERRIDE;
256 virtual PP_Bool IsFullFrame(PP_Instance instance) OVERRIDE; 262 virtual PP_Bool IsFullFrame(PP_Instance instance) OVERRIDE;
257 virtual PP_Var GetWindowObject(PP_Instance instance) OVERRIDE; 263 virtual PP_Var GetWindowObject(PP_Instance instance) OVERRIDE;
258 virtual PP_Var GetOwnerElementObject(PP_Instance instance) OVERRIDE; 264 virtual PP_Var GetOwnerElementObject(PP_Instance instance) OVERRIDE;
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 SkBitmap* sad_plugin_; 487 SkBitmap* sad_plugin_;
482 488
483 typedef std::set<PluginObject*> PluginObjectSet; 489 typedef std::set<PluginObject*> PluginObjectSet;
484 PluginObjectSet live_plugin_objects_; 490 PluginObjectSet live_plugin_objects_;
485 491
486 // Classes of events that the plugin has registered for, both for filtering 492 // Classes of events that the plugin has registered for, both for filtering
487 // and not. The bits are PP_INPUTEVENT_CLASS_*. 493 // and not. The bits are PP_INPUTEVENT_CLASS_*.
488 uint32_t input_event_mask_; 494 uint32_t input_event_mask_;
489 uint32_t filtered_input_event_mask_; 495 uint32_t filtered_input_event_mask_;
490 496
497 // For full-page plugin, if it has a ScrollbarGroup object, we keep a
498 // non-owning pointer to it so we can send WebKit page-resize and mouse move
499 // callbacks. This is needed on Lion for overlay scrollbars.
500 PPB_ScrollbarGroup_Impl* scrollbar_group_;
501
491 DISALLOW_COPY_AND_ASSIGN(PluginInstance); 502 DISALLOW_COPY_AND_ASSIGN(PluginInstance);
492 }; 503 };
493 504
494 } // namespace ppapi 505 } // namespace ppapi
495 } // namespace webkit 506 } // namespace webkit
496 507
497 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ 508 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698