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