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

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

Issue 299753011: Move allocate instance id to chrome/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: HasPermission function moved Created 6 years, 6 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 handles messages coming from a BrowserPlugin's 5 // A BrowserPluginEmbedder handles messages coming from a BrowserPlugin's
6 // embedder that are not directed at any particular existing guest process. 6 // embedder that are not directed at any particular existing guest process.
7 // In the beginning, when a BrowserPlugin instance in the embedder renderer 7 // In the beginning, when a BrowserPlugin instance in the embedder renderer
8 // process requests an initial navigation, the WebContents for that renderer 8 // process requests an initial navigation, the WebContents for that renderer
9 // renderer creates a BrowserPluginEmbedder for itself. The 9 // renderer creates a BrowserPluginEmbedder for itself. The
10 // BrowserPluginEmbedder, in turn, forwards the requests to a 10 // BrowserPluginEmbedder, in turn, forwards the requests to a
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 81
82 // Called by the content embedder when a guest exists with the provided 82 // Called by the content embedder when a guest exists with the provided
83 // |instance_id|. 83 // |instance_id|.
84 void OnGuestCallback(int instance_id, 84 void OnGuestCallback(int instance_id,
85 const BrowserPluginHostMsg_Attach_Params& params, 85 const BrowserPluginHostMsg_Attach_Params& params,
86 const base::DictionaryValue* extra_params, 86 const base::DictionaryValue* extra_params,
87 WebContents* guest_web_contents); 87 WebContents* guest_web_contents);
88 88
89 // Message handlers. 89 // Message handlers.
90 90
91 void OnAllocateInstanceID(int request_id);
92 void OnAttach(int instance_id, 91 void OnAttach(int instance_id,
93 const BrowserPluginHostMsg_Attach_Params& params, 92 const BrowserPluginHostMsg_Attach_Params& params,
94 const base::DictionaryValue& extra_params); 93 const base::DictionaryValue& extra_params);
95 void OnPluginAtPositionResponse(int instance_id, 94 void OnPluginAtPositionResponse(int instance_id,
96 int request_id, 95 int request_id,
97 const gfx::Point& position); 96 const gfx::Point& position);
98 97
99 // Used to correctly update the cursor when dragging over a guest, and to 98 // Used to correctly update the cursor when dragging over a guest, and to
100 // handle a race condition when dropping onto the guest that started the drag 99 // handle a race condition when dropping onto the guest that started the drag
101 // (the race is that the dragend message arrives before the drop message so 100 // (the race is that the dragend message arrives before the drop message so
102 // the drop never takes place). 101 // the drop never takes place).
103 // crbug.com/233571 102 // crbug.com/233571
104 base::WeakPtr<BrowserPluginGuest> guest_dragging_over_; 103 base::WeakPtr<BrowserPluginGuest> guest_dragging_over_;
105 104
106 // Pointer to the guest that started the drag, used to forward necessary drag 105 // Pointer to the guest that started the drag, used to forward necessary drag
107 // status messages to the correct guest. 106 // status messages to the correct guest.
108 base::WeakPtr<BrowserPluginGuest> guest_started_drag_; 107 base::WeakPtr<BrowserPluginGuest> guest_started_drag_;
109 108
110 base::WeakPtrFactory<BrowserPluginEmbedder> weak_ptr_factory_; 109 base::WeakPtrFactory<BrowserPluginEmbedder> weak_ptr_factory_;
111 110
112 DISALLOW_COPY_AND_ASSIGN(BrowserPluginEmbedder); 111 DISALLOW_COPY_AND_ASSIGN(BrowserPluginEmbedder);
113 }; 112 };
114 113
115 } // namespace content 114 } // namespace content
116 115
117 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_EMBEDDER_H_ 116 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_EMBEDDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698