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

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

Issue 554773002: BrowserPlugin: Remove BrowserPluginGuest::ToGuestRect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix build Created 6 years, 3 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
« no previous file with comments | « no previous file | content/browser/browser_plugin/browser_plugin_guest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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. Any 9 // BrowserPluginGuest lives on the UI thread of the browser process. Any
10 // messages about the guest render process that the embedder might be interested 10 // messages about the guest render process that the embedder might be interested
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 // and initializes the guest with the provided |params|. Attaching a guest 176 // and initializes the guest with the provided |params|. Attaching a guest
177 // to an embedder implies that this guest's lifetime is no longer managed 177 // to an embedder implies that this guest's lifetime is no longer managed
178 // by its opener, and it can begin loading resources. 178 // by its opener, and it can begin loading resources.
179 void Attach(int browser_plugin_instance_id, 179 void Attach(int browser_plugin_instance_id,
180 WebContentsImpl* embedder_web_contents, 180 WebContentsImpl* embedder_web_contents,
181 const BrowserPluginHostMsg_Attach_Params& params); 181 const BrowserPluginHostMsg_Attach_Params& params);
182 182
183 // Returns whether BrowserPluginGuest is interested in receiving the given 183 // Returns whether BrowserPluginGuest is interested in receiving the given
184 // |message|. 184 // |message|.
185 static bool ShouldForwardToBrowserPluginGuest(const IPC::Message& message); 185 static bool ShouldForwardToBrowserPluginGuest(const IPC::Message& message);
186 gfx::Rect ToGuestRect(const gfx::Rect& rect);
187 186
188 void DragSourceEndedAt(int client_x, int client_y, int screen_x, 187 void DragSourceEndedAt(int client_x, int client_y, int screen_x,
189 int screen_y, blink::WebDragOperation operation); 188 int screen_y, blink::WebDragOperation operation);
190 189
191 // Called when the drag started by this guest ends at an OS-level. 190 // Called when the drag started by this guest ends at an OS-level.
192 void EndSystemDrag(); 191 void EndSystemDrag();
193 192
194 void RespondToPermissionRequest(int request_id, 193 void RespondToPermissionRequest(int request_id,
195 bool should_allow, 194 bool should_allow,
196 const std::string& user_input); 195 const std::string& user_input);
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 // Forwards all messages from the |pending_messages_| queue to the embedder. 329 // Forwards all messages from the |pending_messages_| queue to the embedder.
331 void SendQueuedMessages(); 330 void SendQueuedMessages();
332 331
333 scoped_ptr<EmbedderWebContentsObserver> embedder_web_contents_observer_; 332 scoped_ptr<EmbedderWebContentsObserver> embedder_web_contents_observer_;
334 WebContentsImpl* embedder_web_contents_; 333 WebContentsImpl* embedder_web_contents_;
335 334
336 // An identifier that uniquely identifies a browser plugin within an embedder. 335 // An identifier that uniquely identifies a browser plugin within an embedder.
337 int browser_plugin_instance_id_; 336 int browser_plugin_instance_id_;
338 float guest_device_scale_factor_; 337 float guest_device_scale_factor_;
339 gfx::Rect guest_window_rect_; 338 gfx::Rect guest_window_rect_;
340 gfx::Rect guest_screen_rect_;
341 bool focused_; 339 bool focused_;
342 bool mouse_locked_; 340 bool mouse_locked_;
343 bool pending_lock_request_; 341 bool pending_lock_request_;
344 bool guest_visible_; 342 bool guest_visible_;
345 bool guest_opaque_; 343 bool guest_opaque_;
346 bool embedder_visible_; 344 bool embedder_visible_;
347 345
348 // Each copy-request is identified by a unique number. The unique number is 346 // Each copy-request is identified by a unique number. The unique number is
349 // used to keep track of the right callback. 347 // used to keep track of the right callback.
350 int copy_request_id_; 348 int copy_request_id_;
(...skipping 29 matching lines...) Expand all
380 // Weak pointer used to ask GeolocationPermissionContext about geolocation 378 // Weak pointer used to ask GeolocationPermissionContext about geolocation
381 // permission. 379 // permission.
382 base::WeakPtrFactory<BrowserPluginGuest> weak_ptr_factory_; 380 base::WeakPtrFactory<BrowserPluginGuest> weak_ptr_factory_;
383 381
384 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); 382 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest);
385 }; 383 };
386 384
387 } // namespace content 385 } // namespace content
388 386
389 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ 387 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/browser_plugin/browser_plugin_guest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698