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

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

Issue 12086095: Fixed drag and drop into and out of Browser Plugin. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: addressed comments Created 7 years, 10 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
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 BrowserPluginEmbedder has a list of guests it manages. 5 // A BrowserPluginEmbedder has a list of guests it manages.
6 // In the beginning when a renderer sees one or more guests (BrowserPlugin 6 // In the beginning when a renderer sees one or more guests (BrowserPlugin
7 // instance(s)) and there is a request to navigate to them, the WebContents for 7 // instance(s)) and there is a request to navigate to them, the WebContents for
8 // that renderer creates a BrowserPluginEmbedder for itself. The 8 // that renderer creates a BrowserPluginEmbedder for itself. The
9 // BrowserPluginEmbedder, in turn, manages a set of BrowserPluginGuests -- one 9 // BrowserPluginEmbedder, in turn, manages a set of BrowserPluginGuests -- one
10 // BrowserPluginGuest for each guest in the embedding WebContents. Note that 10 // BrowserPluginGuest for each guest in the embedding WebContents. Note that
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 const BrowserPluginHostMsg_CreateGuest_Params& params); 124 const BrowserPluginHostMsg_CreateGuest_Params& params);
125 void OnPluginAtPositionResponse(int instance_id, 125 void OnPluginAtPositionResponse(int instance_id,
126 int request_id, 126 int request_id,
127 const gfx::Point& position); 127 const gfx::Point& position);
128 void OnPluginDestroyed(int instance_id); 128 void OnPluginDestroyed(int instance_id);
129 void OnSwapBuffersACK(int route_id, 129 void OnSwapBuffersACK(int route_id,
130 int gpu_host_id, 130 int gpu_host_id,
131 const std::string& mailbox_name, 131 const std::string& mailbox_name,
132 uint32 sync_point); 132 uint32 sync_point);
133 133
134 // Returns the guest browser plugin delegate that is currently dragging.
135 BrowserPluginGuest* GetDraggingGuest() const;
136
137 // Returns true if there is a guest currently being dragged over.
138 bool IsDragOverGuest() const;
139
134 // Static factory instance (always NULL for non-test). 140 // Static factory instance (always NULL for non-test).
135 static BrowserPluginHostFactory* factory_; 141 static BrowserPluginHostFactory* factory_;
136 142
137 // A scoped container for notification registries. 143 // A scoped container for notification registries.
138 NotificationRegistrar registrar_; 144 NotificationRegistrar registrar_;
139 145
140 // Contains guests' WebContents, mapping from their instance ids. 146 // Contains guests' WebContents, mapping from their instance ids.
141 ContainerInstanceMap guest_web_contents_by_instance_id_; 147 ContainerInstanceMap guest_web_contents_by_instance_id_;
142 RenderViewHost* render_view_host_; 148 RenderViewHost* render_view_host_;
143 // Tracks the visibility state of the embedder. 149 // Tracks the visibility state of the embedder.
144 bool visible_; 150 bool visible_;
145 // Map that contains outstanding queries to |GetBrowserPluginAt|. 151 // Map that contains outstanding queries to |GetBrowserPluginAt|.
146 // We need a roundtrip to renderer process to know the answer, therefore 152 // We need a roundtrip to renderer process to know the answer, therefore
147 // storing these callbacks is required. 153 // storing these callbacks is required.
148 typedef std::map<int, WebContents::GetRenderViewHostCallback> 154 typedef std::map<int, WebContents::GetRenderViewHostCallback>
149 GetRenderViewHostCallbackMap; 155 GetRenderViewHostCallbackMap;
150 GetRenderViewHostCallbackMap pending_get_render_view_callbacks_; 156 GetRenderViewHostCallbackMap pending_get_render_view_callbacks_;
151 // Next request id for BrowserPluginMsg_PluginAtPositionRequest query. 157 // Next request id for BrowserPluginMsg_PluginAtPositionRequest query.
152 int next_get_render_view_request_id_; 158 int next_get_render_view_request_id_;
153 int next_instance_id_; 159 int next_instance_id_;
154 160
155 DISALLOW_COPY_AND_ASSIGN(BrowserPluginEmbedder); 161 DISALLOW_COPY_AND_ASSIGN(BrowserPluginEmbedder);
156 }; 162 };
157 163
158 } // namespace content 164 } // namespace content
159 165
160 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_EMBEDDER_H_ 166 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_EMBEDDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698