Chromium Code Reviews| 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> |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 202 | 202 |
| 203 // PPP_Instance and PPP_Instance_Private. | 203 // PPP_Instance and PPP_Instance_Private. |
| 204 bool Initialize(const std::vector<std::string>& arg_names, | 204 bool Initialize(const std::vector<std::string>& arg_names, |
| 205 const std::vector<std::string>& arg_values, | 205 const std::vector<std::string>& arg_values, |
| 206 bool full_frame, | 206 bool full_frame, |
| 207 scoped_ptr<PluginInstanceThrottlerImpl> throttler); | 207 scoped_ptr<PluginInstanceThrottlerImpl> throttler); |
| 208 bool HandleDocumentLoad(const blink::WebURLResponse& response); | 208 bool HandleDocumentLoad(const blink::WebURLResponse& response); |
| 209 bool HandleInputEvent(const blink::WebInputEvent& event, | 209 bool HandleInputEvent(const blink::WebInputEvent& event, |
| 210 blink::WebCursorInfo* cursor_info); | 210 blink::WebCursorInfo* cursor_info); |
| 211 PP_Var GetInstanceObject(v8::Isolate* isolate); | 211 PP_Var GetInstanceObject(v8::Isolate* isolate); |
| 212 void ViewChanged(const gfx::Rect& position, | 212 void ViewChanged(const gfx::Rect& window, |
| 213 const gfx::Rect& clip, | 213 const gfx::Rect& clip, |
| 214 const gfx::Rect& unobscured, | |
| 214 const std::vector<gfx::Rect>& cut_outs_rects); | 215 const std::vector<gfx::Rect>& cut_outs_rects); |
| 215 | 216 |
| 216 // Handlers for composition events. | 217 // Handlers for composition events. |
| 217 bool HandleCompositionStart(const base::string16& text); | 218 bool HandleCompositionStart(const base::string16& text); |
| 218 bool HandleCompositionUpdate( | 219 bool HandleCompositionUpdate( |
| 219 const base::string16& text, | 220 const base::string16& text, |
| 220 const std::vector<blink::WebCompositionUnderline>& underlines, | 221 const std::vector<blink::WebCompositionUnderline>& underlines, |
| 221 int selection_start, | 222 int selection_start, |
| 222 int selection_end); | 223 int selection_end); |
| 223 bool HandleCompositionEnd(const base::string16& text); | 224 bool HandleCompositionEnd(const base::string16& text); |
| (...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 735 | 736 |
| 736 // Indicates whether this is a full frame instance, which means it represents | 737 // Indicates whether this is a full frame instance, which means it represents |
| 737 // an entire document rather than an embed tag. | 738 // an entire document rather than an embed tag. |
| 738 bool full_frame_; | 739 bool full_frame_; |
| 739 | 740 |
| 740 // Stores the current state of the plugin view. | 741 // Stores the current state of the plugin view. |
| 741 ppapi::ViewData view_data_; | 742 ppapi::ViewData view_data_; |
| 742 // The last state sent to the plugin. It is only valid after | 743 // The last state sent to the plugin. It is only valid after |
| 743 // |sent_initial_did_change_view_| is set to true. | 744 // |sent_initial_did_change_view_| is set to true. |
| 744 ppapi::ViewData last_sent_view_data_; | 745 ppapi::ViewData last_sent_view_data_; |
| 746 // The current unobscured portion of the plugin. | |
| 747 gfx::Rect unobscured_; | |
|
piman
2015/04/01 01:02:41
nit: maybe unobscured_rect_?
unobscured_ sounds li
tommycli
2015/04/01 18:55:28
Done.
| |
| 745 | 748 |
| 746 // Indicates if we've ever sent a didChangeView to the plugin. This ensures we | 749 // Indicates if we've ever sent a didChangeView to the plugin. This ensures we |
| 747 // always send an initial notification, even if the position and clip are the | 750 // always send an initial notification, even if the position and clip are the |
| 748 // same as the default values. | 751 // same as the default values. |
| 749 bool sent_initial_did_change_view_; | 752 bool sent_initial_did_change_view_; |
| 750 | 753 |
| 751 // The current device context for painting in 2D, 3D or compositor. | 754 // The current device context for painting in 2D, 3D or compositor. |
| 752 scoped_refptr<PPB_Graphics3D_Impl> bound_graphics_3d_; | 755 scoped_refptr<PPB_Graphics3D_Impl> bound_graphics_3d_; |
| 753 PepperGraphics2DHost* bound_graphics_2d_platform_; | 756 PepperGraphics2DHost* bound_graphics_2d_platform_; |
| 754 PepperCompositorHost* bound_compositor_; | 757 PepperCompositorHost* bound_compositor_; |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 933 // view change events. | 936 // view change events. |
| 934 base::WeakPtrFactory<PepperPluginInstanceImpl> view_change_weak_ptr_factory_; | 937 base::WeakPtrFactory<PepperPluginInstanceImpl> view_change_weak_ptr_factory_; |
| 935 base::WeakPtrFactory<PepperPluginInstanceImpl> weak_factory_; | 938 base::WeakPtrFactory<PepperPluginInstanceImpl> weak_factory_; |
| 936 | 939 |
| 937 DISALLOW_COPY_AND_ASSIGN(PepperPluginInstanceImpl); | 940 DISALLOW_COPY_AND_ASSIGN(PepperPluginInstanceImpl); |
| 938 }; | 941 }; |
| 939 | 942 |
| 940 } // namespace content | 943 } // namespace content |
| 941 | 944 |
| 942 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ | 945 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ |
| OLD | NEW |