OLD | NEW |
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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 | 246 |
247 // Find the given |search_text| in the page. Returns true if the find request | 247 // Find the given |search_text| in the page. Returns true if the find request |
248 // is handled by this browser plugin guest. | 248 // is handled by this browser plugin guest. |
249 bool HandleFindForEmbedder(int request_id, | 249 bool HandleFindForEmbedder(int request_id, |
250 const base::string16& search_text, | 250 const base::string16& search_text, |
251 const blink::WebFindOptions& options); | 251 const blink::WebFindOptions& options); |
252 bool HandleStopFindingForEmbedder(StopFindAction action); | 252 bool HandleStopFindingForEmbedder(StopFindAction action); |
253 | 253 |
254 void ResendEventToEmbedder(const blink::WebInputEvent& event); | 254 void ResendEventToEmbedder(const blink::WebInputEvent& event); |
255 | 255 |
| 256 // TODO(ekaramad): Remove this once https://crbug.com/642826 is resolved. |
| 257 bool can_use_cross_process_frames() const { |
| 258 return can_use_cross_process_frames_; |
| 259 } |
| 260 |
256 protected: | 261 protected: |
257 | 262 |
258 // BrowserPluginGuest is a WebContentsObserver of |web_contents| and | 263 // BrowserPluginGuest is a WebContentsObserver of |web_contents| and |
259 // |web_contents| has to stay valid for the lifetime of BrowserPluginGuest. | 264 // |web_contents| has to stay valid for the lifetime of BrowserPluginGuest. |
260 // Constructor protected for testing. | 265 // Constructor protected for testing. |
261 BrowserPluginGuest(bool has_render_view, | 266 BrowserPluginGuest(bool has_render_view, |
262 WebContentsImpl* web_contents, | 267 WebContentsImpl* web_contents, |
263 BrowserPluginGuestDelegate* delegate); | 268 BrowserPluginGuestDelegate* delegate); |
264 | 269 |
265 // Protected for testing. | 270 // Protected for testing. |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 | 444 |
440 // Ignore the URL dragged into guest that is coming from guest. | 445 // Ignore the URL dragged into guest that is coming from guest. |
441 bool ignore_dragged_url_; | 446 bool ignore_dragged_url_; |
442 | 447 |
443 // This is a queue of messages that are destined to be sent to the embedder | 448 // This is a queue of messages that are destined to be sent to the embedder |
444 // once the guest is attached to a particular embedder. | 449 // once the guest is attached to a particular embedder. |
445 std::deque<linked_ptr<IPC::Message> > pending_messages_; | 450 std::deque<linked_ptr<IPC::Message> > pending_messages_; |
446 | 451 |
447 BrowserPluginGuestDelegate* const delegate_; | 452 BrowserPluginGuestDelegate* const delegate_; |
448 | 453 |
| 454 // Whether or not this BrowserPluginGuest can use cross process frames. This |
| 455 // means when we have --use-cross-process-frames-for-guests on, the |
| 456 // WebContents associated with this BrowserPluginGuest has OOPIF structure. |
| 457 bool can_use_cross_process_frames_; |
| 458 |
449 // Weak pointer used to ask GeolocationPermissionContext about geolocation | 459 // Weak pointer used to ask GeolocationPermissionContext about geolocation |
450 // permission. | 460 // permission. |
451 base::WeakPtrFactory<BrowserPluginGuest> weak_ptr_factory_; | 461 base::WeakPtrFactory<BrowserPluginGuest> weak_ptr_factory_; |
452 | 462 |
453 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); | 463 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); |
454 }; | 464 }; |
455 | 465 |
456 } // namespace content | 466 } // namespace content |
457 | 467 |
458 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ | 468 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ |
OLD | NEW |