| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
| 15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 16 #include "base/memory/weak_ptr.h" |
| 16 #include "base/string16.h" | 17 #include "base/string16.h" |
| 17 #include "googleurl/src/gurl.h" | 18 #include "googleurl/src/gurl.h" |
| 18 #include "ppapi/c/dev/pp_cursor_type_dev.h" | 19 #include "ppapi/c/dev/pp_cursor_type_dev.h" |
| 19 #include "ppapi/c/dev/ppp_printing_dev.h" | 20 #include "ppapi/c/dev/ppp_printing_dev.h" |
| 20 #include "ppapi/c/dev/ppp_find_dev.h" | 21 #include "ppapi/c/dev/ppp_find_dev.h" |
| 21 #include "ppapi/c/dev/ppp_selection_dev.h" | 22 #include "ppapi/c/dev/ppp_selection_dev.h" |
| 22 #include "ppapi/c/dev/ppp_text_input_dev.h" | 23 #include "ppapi/c/dev/ppp_text_input_dev.h" |
| 23 #include "ppapi/c/dev/ppp_zoom_dev.h" | 24 #include "ppapi/c/dev/ppp_zoom_dev.h" |
| 24 #include "ppapi/c/pp_completion_callback.h" | 25 #include "ppapi/c/pp_completion_callback.h" |
| 25 #include "ppapi/c/pp_instance.h" | 26 #include "ppapi/c/pp_instance.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 class PPB_ImageData_Impl; | 84 class PPB_ImageData_Impl; |
| 84 class PPB_URLLoader_Impl; | 85 class PPB_URLLoader_Impl; |
| 85 class PPB_URLRequestInfo_Impl; | 86 class PPB_URLRequestInfo_Impl; |
| 86 | 87 |
| 87 // Represents one time a plugin appears on one web page. | 88 // Represents one time a plugin appears on one web page. |
| 88 // | 89 // |
| 89 // Note: to get from a PP_Instance to a PluginInstance*, use the | 90 // Note: to get from a PP_Instance to a PluginInstance*, use the |
| 90 // ResourceTracker. | 91 // ResourceTracker. |
| 91 class WEBKIT_PLUGINS_EXPORT PluginInstance : | 92 class WEBKIT_PLUGINS_EXPORT PluginInstance : |
| 92 public base::RefCounted<PluginInstance>, | 93 public base::RefCounted<PluginInstance>, |
| 94 public base::SupportsWeakPtr<PluginInstance>, |
| 93 public ::ppapi::FunctionGroupBase, | 95 public ::ppapi::FunctionGroupBase, |
| 94 public ::ppapi::PPB_Instance_Shared { | 96 public ::ppapi::PPB_Instance_Shared { |
| 95 public: | 97 public: |
| 96 // Create and return a PluginInstance object which supports the | 98 // Create and return a PluginInstance object which supports the |
| 97 // given version. | 99 // given version. |
| 98 static PluginInstance* Create1_0(PluginDelegate* delegate, | 100 static PluginInstance* Create1_0(PluginDelegate* delegate, |
| 99 PluginModule* module, | 101 PluginModule* module, |
| 100 const void* ppp_instance_if_1_0); | 102 const void* ppp_instance_if_1_0); |
| 101 static PluginInstance* Create1_1(PluginDelegate* delegate, | 103 static PluginInstance* Create1_1(PluginDelegate* delegate, |
| 102 PluginModule* module, | 104 PluginModule* module, |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 TransportDIB** dib, | 216 TransportDIB** dib, |
| 215 gfx::Rect* dib_bounds, | 217 gfx::Rect* dib_bounds, |
| 216 gfx::Rect* clip); | 218 gfx::Rect* clip); |
| 217 | 219 |
| 218 // Tracks all live PluginObjects. | 220 // Tracks all live PluginObjects. |
| 219 void AddPluginObject(PluginObject* plugin_object); | 221 void AddPluginObject(PluginObject* plugin_object); |
| 220 void RemovePluginObject(PluginObject* plugin_object); | 222 void RemovePluginObject(PluginObject* plugin_object); |
| 221 | 223 |
| 222 string16 GetSelectedText(bool html); | 224 string16 GetSelectedText(bool html); |
| 223 string16 GetLinkAtPosition(const gfx::Point& point); | 225 string16 GetLinkAtPosition(const gfx::Point& point); |
| 224 bool RequestSurroundingText(size_t desired_number_of_characters); | 226 void RequestSurroundingText(size_t desired_number_of_characters); |
| 225 void Zoom(double factor, bool text_only); | 227 void Zoom(double factor, bool text_only); |
| 226 bool StartFind(const string16& search_text, | 228 bool StartFind(const string16& search_text, |
| 227 bool case_sensitive, | 229 bool case_sensitive, |
| 228 int identifier); | 230 int identifier); |
| 229 void SelectFindResult(bool forward); | 231 void SelectFindResult(bool forward); |
| 230 void StopFind(); | 232 void StopFind(); |
| 231 | 233 |
| 232 bool SupportsPrintInterface(); | 234 bool SupportsPrintInterface(); |
| 233 bool IsPrintScalingDisabled(); | 235 bool IsPrintScalingDisabled(); |
| 234 int PrintBegin(const gfx::Rect& printable_area, int printer_dpi); | 236 int PrintBegin(const gfx::Rect& printable_area, int printer_dpi); |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 // a user gesture after it has been processed. | 648 // a user gesture after it has been processed. |
| 647 PP_TimeTicks pending_user_gesture_; | 649 PP_TimeTicks pending_user_gesture_; |
| 648 | 650 |
| 649 DISALLOW_COPY_AND_ASSIGN(PluginInstance); | 651 DISALLOW_COPY_AND_ASSIGN(PluginInstance); |
| 650 }; | 652 }; |
| 651 | 653 |
| 652 } // namespace ppapi | 654 } // namespace ppapi |
| 653 } // namespace webkit | 655 } // namespace webkit |
| 654 | 656 |
| 655 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ | 657 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ |
| OLD | NEW |