| 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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 class MediaRequest; | 327 class MediaRequest; |
| 328 class NewWindowRequest; | 328 class NewWindowRequest; |
| 329 class PermissionRequest; | 329 class PermissionRequest; |
| 330 class PointerLockRequest; | 330 class PointerLockRequest; |
| 331 | 331 |
| 332 // Tracks the name, and target URL of the new window and whether or not it has | 332 // Tracks the name, and target URL of the new window and whether or not it has |
| 333 // changed since the WebContents has been created and before the new window | 333 // changed since the WebContents has been created and before the new window |
| 334 // has been attached to a BrowserPlugin. Once the first navigation commits, we | 334 // has been attached to a BrowserPlugin. Once the first navigation commits, we |
| 335 // no longer track this information. | 335 // no longer track this information. |
| 336 struct NewWindowInfo { | 336 struct NewWindowInfo { |
| 337 bool changed; | |
| 338 GURL url; | 337 GURL url; |
| 339 std::string name; | 338 std::string name; |
| 340 NewWindowInfo(const GURL& url, const std::string& name) : | 339 NewWindowInfo(const GURL& url, const std::string& name) : |
| 341 changed(false), | |
| 342 url(url), | 340 url(url), |
| 343 name(name) {} | 341 name(name) {} |
| 344 }; | 342 }; |
| 345 | 343 |
| 346 // BrowserPluginGuest is a WebContentsObserver of |web_contents| and | 344 // BrowserPluginGuest is a WebContentsObserver of |web_contents| and |
| 347 // |web_contents| has to stay valid for the lifetime of BrowserPluginGuest. | 345 // |web_contents| has to stay valid for the lifetime of BrowserPluginGuest. |
| 348 BrowserPluginGuest(int instance_id, | 346 BrowserPluginGuest(int instance_id, |
| 349 bool has_render_view, | 347 bool has_render_view, |
| 350 WebContentsImpl* web_contents, | 348 WebContentsImpl* web_contents, |
| 351 BrowserPluginGuest* opener); | 349 BrowserPluginGuest* opener); |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 605 // Weak pointer used to ask GeolocationPermissionContext about geolocation | 603 // Weak pointer used to ask GeolocationPermissionContext about geolocation |
| 606 // permission. | 604 // permission. |
| 607 base::WeakPtrFactory<BrowserPluginGuest> weak_ptr_factory_; | 605 base::WeakPtrFactory<BrowserPluginGuest> weak_ptr_factory_; |
| 608 | 606 |
| 609 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); | 607 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); |
| 610 }; | 608 }; |
| 611 | 609 |
| 612 } // namespace content | 610 } // namespace content |
| 613 | 611 |
| 614 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ | 612 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ |
| OLD | NEW |