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

Side by Side Diff: content/browser/browser_plugin/browser_plugin_guest.h

Issue 18281002: Move WebDropData to content::DropData and split off conversion function. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Mac build error. Created 7 years, 5 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) 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 // A BrowserPluginGuest is the browser side of a browser <--> embedder 5 // A BrowserPluginGuest is the browser side of a browser <--> embedder
6 // renderer channel. A BrowserPlugin (a WebPlugin) is on the embedder 6 // renderer channel. A BrowserPlugin (a WebPlugin) is on the embedder
7 // renderer side of browser <--> embedder renderer communication. 7 // renderer side of browser <--> embedder renderer communication.
8 // 8 //
9 // BrowserPluginGuest lives on the UI thread of the browser process. It has a 9 // BrowserPluginGuest lives on the UI thread of the browser process. It has a
10 // helper, BrowserPluginGuestHelper, which is a RenderViewHostObserver. The 10 // helper, BrowserPluginGuestHelper, which is a RenderViewHostObserver. The
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 struct BrowserPluginHostMsg_AutoSize_Params; 46 struct BrowserPluginHostMsg_AutoSize_Params;
47 struct BrowserPluginHostMsg_Attach_Params; 47 struct BrowserPluginHostMsg_Attach_Params;
48 struct BrowserPluginHostMsg_ResizeGuest_Params; 48 struct BrowserPluginHostMsg_ResizeGuest_Params;
49 struct ViewHostMsg_CreateWindow_Params; 49 struct ViewHostMsg_CreateWindow_Params;
50 #if defined(OS_MACOSX) 50 #if defined(OS_MACOSX)
51 struct ViewHostMsg_ShowPopup_Params; 51 struct ViewHostMsg_ShowPopup_Params;
52 #endif 52 #endif
53 struct ViewHostMsg_UpdateRect_Params; 53 struct ViewHostMsg_UpdateRect_Params;
54 class WebCursor; 54 class WebCursor;
55 struct WebDropData;
56 55
57 namespace cc { 56 namespace cc {
58 class CompositorFrameAck; 57 class CompositorFrameAck;
59 } 58 }
60 59
61 namespace WebKit { 60 namespace WebKit {
62 class WebInputEvent; 61 class WebInputEvent;
63 } 62 }
64 63
65 namespace content { 64 namespace content {
66 65
67 class BrowserPluginHostFactory; 66 class BrowserPluginHostFactory;
68 class BrowserPluginEmbedder; 67 class BrowserPluginEmbedder;
69 class BrowserPluginGuestManager; 68 class BrowserPluginGuestManager;
70 class RenderProcessHost; 69 class RenderProcessHost;
71 class RenderWidgetHostView; 70 class RenderWidgetHostView;
71 struct DropData;
72 struct MediaStreamRequest; 72 struct MediaStreamRequest;
73 73
74 // A browser plugin guest provides functionality for WebContents to operate in 74 // A browser plugin guest provides functionality for WebContents to operate in
75 // the guest role and implements guest-specific overrides for ViewHostMsg_* 75 // the guest role and implements guest-specific overrides for ViewHostMsg_*
76 // messages. 76 // messages.
77 // 77 //
78 // When a guest is initially created, it is in an unattached state. That is, 78 // When a guest is initially created, it is in an unattached state. That is,
79 // it is not visible anywhere and has no embedder WebContents assigned. 79 // it is not visible anywhere and has no embedder WebContents assigned.
80 // A BrowserPluginGuest is said to be "attached" if it has an embedder. 80 // A BrowserPluginGuest is said to be "attached" if it has an embedder.
81 // A BrowserPluginGuest can also create a new unattached guest via 81 // A BrowserPluginGuest can also create a new unattached guest via
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 BrowserPluginPermissionType permission_type, 326 BrowserPluginPermissionType permission_type,
327 int request_id, 327 int request_id,
328 bool should_allow); 328 bool should_allow);
329 // Handles drag events from the embedder. 329 // Handles drag events from the embedder.
330 // When dragging, the drag events go to the embedder first, and if the drag 330 // When dragging, the drag events go to the embedder first, and if the drag
331 // happens on the browser plugin, then the plugin sends a corresponding 331 // happens on the browser plugin, then the plugin sends a corresponding
332 // drag-message to the guest. This routes the drag-message to the guest 332 // drag-message to the guest. This routes the drag-message to the guest
333 // renderer. 333 // renderer.
334 void OnDragStatusUpdate(int instance_id, 334 void OnDragStatusUpdate(int instance_id,
335 WebKit::WebDragStatus drag_status, 335 WebKit::WebDragStatus drag_status,
336 const WebDropData& drop_data, 336 const DropData& drop_data,
337 WebKit::WebDragOperationsMask drag_mask, 337 WebKit::WebDragOperationsMask drag_mask,
338 const gfx::Point& location); 338 const gfx::Point& location);
339 // Instructs the guest to execute an edit command decoded in the embedder. 339 // Instructs the guest to execute an edit command decoded in the embedder.
340 void OnExecuteEditCommand(int instance_id, 340 void OnExecuteEditCommand(int instance_id,
341 const std::string& command); 341 const std::string& command);
342 // Overriden in tests. 342 // Overriden in tests.
343 virtual void OnHandleInputEvent(int instance_id, 343 virtual void OnHandleInputEvent(int instance_id,
344 const gfx::Rect& guest_window_rect, 344 const gfx::Rect& guest_window_rect,
345 const WebKit::WebInputEvent* event); 345 const WebKit::WebInputEvent* event);
346 void OnLockMouse(bool user_gesture, 346 void OnLockMouse(bool user_gesture,
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 // This is a queue of messages that are destined to be sent to the embedder 505 // This is a queue of messages that are destined to be sent to the embedder
506 // once the guest is attached to a particular embedder. 506 // once the guest is attached to a particular embedder.
507 std::queue<IPC::Message*> pending_messages_; 507 std::queue<IPC::Message*> pending_messages_;
508 508
509 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); 509 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest);
510 }; 510 };
511 511
512 } // namespace content 512 } // namespace content
513 513
514 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ 514 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698