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 CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ |
6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ | 6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/callback.h" | 13 #include "base/callback.h" |
14 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
16 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
17 #include "base/memory/weak_ptr.h" | 17 #include "base/memory/weak_ptr.h" |
18 #include "base/strings/string16.h" | 18 #include "base/strings/string16.h" |
19 #include "cc/layers/content_layer_client.h" | 19 #include "cc/layers/content_layer_client.h" |
20 #include "cc/layers/texture_layer_client.h" | 20 #include "cc/layers/texture_layer_client.h" |
21 #include "content/common/content_export.h" | 21 #include "content/common/content_export.h" |
22 #include "content/public/renderer/pepper_plugin_instance.h" | 22 #include "content/public/renderer/pepper_plugin_instance.h" |
23 #include "content/public/renderer/render_frame_observer.h" | 23 #include "content/public/renderer/render_frame_observer.h" |
24 #include "content/renderer/mouse_lock_dispatcher.h" | 24 #include "content/renderer/mouse_lock_dispatcher.h" |
| 25 #include "gpu/command_buffer/common/mailbox.h" |
25 #include "ppapi/c/dev/pp_cursor_type_dev.h" | 26 #include "ppapi/c/dev/pp_cursor_type_dev.h" |
26 #include "ppapi/c/dev/ppp_find_dev.h" | 27 #include "ppapi/c/dev/ppp_find_dev.h" |
27 #include "ppapi/c/dev/ppp_printing_dev.h" | 28 #include "ppapi/c/dev/ppp_printing_dev.h" |
28 #include "ppapi/c/dev/ppp_selection_dev.h" | 29 #include "ppapi/c/dev/ppp_selection_dev.h" |
29 #include "ppapi/c/dev/ppp_text_input_dev.h" | 30 #include "ppapi/c/dev/ppp_text_input_dev.h" |
30 #include "ppapi/c/dev/ppp_zoom_dev.h" | 31 #include "ppapi/c/dev/ppp_zoom_dev.h" |
31 #include "ppapi/c/pp_completion_callback.h" | 32 #include "ppapi/c/pp_completion_callback.h" |
32 #include "ppapi/c/pp_instance.h" | 33 #include "ppapi/c/pp_instance.h" |
33 #include "ppapi/c/pp_time.h" | 34 #include "ppapi/c/pp_time.h" |
34 #include "ppapi/c/pp_var.h" | 35 #include "ppapi/c/pp_var.h" |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 // invalidate the entire plugin. | 165 // invalidate the entire plugin. |
165 void InvalidateRect(const gfx::Rect& rect); | 166 void InvalidateRect(const gfx::Rect& rect); |
166 | 167 |
167 // Schedules a scroll of the plugin. This uses optimized scrolling only for | 168 // Schedules a scroll of the plugin. This uses optimized scrolling only for |
168 // full-frame plugins, as otherwise there could be other elements on top. The | 169 // full-frame plugins, as otherwise there could be other elements on top. The |
169 // slow path can also be triggered if there is an overlapping frame. | 170 // slow path can also be triggered if there is an overlapping frame. |
170 void ScrollRect(int dx, int dy, const gfx::Rect& rect); | 171 void ScrollRect(int dx, int dy, const gfx::Rect& rect); |
171 | 172 |
172 // Commit the backing texture to the screen once the side effects some | 173 // Commit the backing texture to the screen once the side effects some |
173 // rendering up to an offscreen SwapBuffers are visible. | 174 // rendering up to an offscreen SwapBuffers are visible. |
174 void CommitBackingTexture(); | 175 void CommitBackingTexture(uint32 sync_point); |
175 | 176 |
176 // Called when the out-of-process plugin implementing this instance crashed. | 177 // Called when the out-of-process plugin implementing this instance crashed. |
177 void InstanceCrashed(); | 178 void InstanceCrashed(); |
178 | 179 |
179 // PPB_Instance and PPB_Instance_Private implementation. | 180 // PPB_Instance and PPB_Instance_Private implementation. |
180 bool full_frame() const { return full_frame_; } | 181 bool full_frame() const { return full_frame_; } |
181 const ppapi::ViewData& view_data() const { return view_data_; } | 182 const ppapi::ViewData& view_data() const { return view_data_; } |
182 | 183 |
183 // PPP_Instance and PPP_Instance_Private. | 184 // PPP_Instance and PPP_Instance_Private. |
184 bool Initialize(const std::vector<std::string>& arg_names, | 185 bool Initialize(const std::vector<std::string>& arg_names, |
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
883 base::WeakPtrFactory<PepperPluginInstanceImpl> view_change_weak_ptr_factory_; | 884 base::WeakPtrFactory<PepperPluginInstanceImpl> view_change_weak_ptr_factory_; |
884 base::WeakPtrFactory<PepperPluginInstanceImpl> weak_factory_; | 885 base::WeakPtrFactory<PepperPluginInstanceImpl> weak_factory_; |
885 | 886 |
886 friend class PpapiPluginInstanceTest; | 887 friend class PpapiPluginInstanceTest; |
887 DISALLOW_COPY_AND_ASSIGN(PepperPluginInstanceImpl); | 888 DISALLOW_COPY_AND_ASSIGN(PepperPluginInstanceImpl); |
888 }; | 889 }; |
889 | 890 |
890 } // namespace content | 891 } // namespace content |
891 | 892 |
892 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ | 893 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ |
OLD | NEW |