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

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

Issue 8970016: refactoring mouse lock to support pepper and WebKit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 struct PPP_MouseLock; 46 struct PPP_MouseLock;
47 struct PPP_Pdf; 47 struct PPP_Pdf;
48 struct PPP_Selection_Dev; 48 struct PPP_Selection_Dev;
49 struct PPP_Zoom_Dev; 49 struct PPP_Zoom_Dev;
50 50
51 class SkBitmap; 51 class SkBitmap;
52 class TransportDIB; 52 class TransportDIB;
53 53
54 namespace WebKit { 54 namespace WebKit {
55 class WebInputEvent; 55 class WebInputEvent;
56 class WebMouseEvent;
56 class WebPluginContainer; 57 class WebPluginContainer;
57 struct WebCompositionUnderline; 58 struct WebCompositionUnderline;
58 struct WebCursorInfo; 59 struct WebCursorInfo;
59 } 60 }
60 61
61 namespace ppapi { 62 namespace ppapi {
62 struct InputEventData; 63 struct InputEventData;
63 struct PPP_Instance_Combined; 64 struct PPP_Instance_Combined;
64 class Resource; 65 class Resource;
65 } 66 }
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 289
289 // Implementation of PPP_Messaging. 290 // Implementation of PPP_Messaging.
290 void HandleMessage(PP_Var message); 291 void HandleMessage(PP_Var message);
291 292
292 PluginDelegate::PlatformContext3D* CreateContext3D(); 293 PluginDelegate::PlatformContext3D* CreateContext3D();
293 294
294 // Returns true iff the plugin is a full-page plugin (i.e. not in an iframe 295 // Returns true iff the plugin is a full-page plugin (i.e. not in an iframe
295 // or embedded in a page). 296 // or embedded in a page).
296 bool IsFullPagePlugin() const; 297 bool IsFullPagePlugin() const;
297 298
298 void OnLockMouseACK(int32_t result); 299 // Mouse Lock Target interface:
299 void OnMouseLockLost(); 300 virtual void OnLockMouseACK2(bool success);
301 virtual void OnMouseLockLost2();
302 virtual void HandleMouseLockedInputEvent(const WebKit::WebMouseEvent& event);
300 303
301 // Simulates an input event to the plugin by passing it down to WebKit, 304 // Simulates an input event to the plugin by passing it down to WebKit,
302 // which sends it back up to the plugin as if it came from the user. 305 // which sends it back up to the plugin as if it came from the user.
303 void SimulateInputEvent(const ::ppapi::InputEventData& input_event); 306 void SimulateInputEvent(const ::ppapi::InputEventData& input_event);
304 307
305 // FunctionGroupBase overrides. 308 // FunctionGroupBase overrides.
306 virtual ::ppapi::thunk::PPB_Instance_FunctionAPI* 309 virtual ::ppapi::thunk::PPB_Instance_FunctionAPI*
307 AsPPB_Instance_FunctionAPI() OVERRIDE; 310 AsPPB_Instance_FunctionAPI() OVERRIDE;
308 311
309 // PPB_Instance_FunctionAPI implementation. 312 // PPB_Instance_FunctionAPI implementation.
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 // and not. The bits are PP_INPUTEVENT_CLASS_*. 602 // and not. The bits are PP_INPUTEVENT_CLASS_*.
600 uint32_t input_event_mask_; 603 uint32_t input_event_mask_;
601 uint32_t filtered_input_event_mask_; 604 uint32_t filtered_input_event_mask_;
602 605
603 // Text composition status. 606 // Text composition status.
604 ui::TextInputType text_input_type_; 607 ui::TextInputType text_input_type_;
605 gfx::Rect text_input_caret_; 608 gfx::Rect text_input_caret_;
606 gfx::Rect text_input_caret_bounds_; 609 gfx::Rect text_input_caret_bounds_;
607 bool text_input_caret_set_; 610 bool text_input_caret_set_;
608 611
612 bool mouse_locked_to_this_instance_;
609 PP_CompletionCallback lock_mouse_callback_; 613 PP_CompletionCallback lock_mouse_callback_;
610 614
611 DISALLOW_COPY_AND_ASSIGN(PluginInstance); 615 DISALLOW_COPY_AND_ASSIGN(PluginInstance);
612 }; 616 };
613 617
614 } // namespace ppapi 618 } // namespace ppapi
615 } // namespace webkit 619 } // namespace webkit
616 620
617 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ 621 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698