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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 | 356 |
357 // Each copy-request is identified by a unique number. The unique number is | 357 // Each copy-request is identified by a unique number. The unique number is |
358 // used to keep track of the right callback. | 358 // used to keep track of the right callback. |
359 int copy_request_id_; | 359 int copy_request_id_; |
360 typedef base::Callback<void(bool, const SkBitmap&)> CopyRequestCallback; | 360 typedef base::Callback<void(bool, const SkBitmap&)> CopyRequestCallback; |
361 typedef std::map<int, const CopyRequestCallback> CopyRequestMap; | 361 typedef std::map<int, const CopyRequestCallback> CopyRequestMap; |
362 CopyRequestMap copy_request_callbacks_; | 362 CopyRequestMap copy_request_callbacks_; |
363 | 363 |
364 // Indicates that this BrowserPluginGuest has associated renderer-side state. | 364 // Indicates that this BrowserPluginGuest has associated renderer-side state. |
365 // This is used to determine whether or not to create a new RenderView when | 365 // This is used to determine whether or not to create a new RenderView when |
366 // this guest is attached. | 366 // this guest is attached. A BrowserPluginGuest would have renderer-side state |
| 367 // prior to attachment if it is created via a call to window.open and |
| 368 // maintains a JavaScript reference to its opener. |
367 bool has_render_view_; | 369 bool has_render_view_; |
368 | 370 |
369 // Last seen size of guest contents (by OnUpdateRect). | 371 // Last seen size of guest contents (by OnUpdateRect). |
370 gfx::Size last_seen_view_size_; | 372 gfx::Size last_seen_view_size_; |
371 // Last seen autosize attribute state (by OnUpdateRect). | 373 // Last seen autosize attribute state (by OnUpdateRect). |
372 bool last_seen_auto_size_enabled_; | 374 bool last_seen_auto_size_enabled_; |
373 | 375 |
374 bool is_in_destruction_; | 376 bool is_in_destruction_; |
375 | 377 |
376 // Text input type states. | 378 // Text input type states. |
(...skipping 10 matching lines...) Expand all Loading... |
387 // Weak pointer used to ask GeolocationPermissionContext about geolocation | 389 // Weak pointer used to ask GeolocationPermissionContext about geolocation |
388 // permission. | 390 // permission. |
389 base::WeakPtrFactory<BrowserPluginGuest> weak_ptr_factory_; | 391 base::WeakPtrFactory<BrowserPluginGuest> weak_ptr_factory_; |
390 | 392 |
391 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); | 393 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); |
392 }; | 394 }; |
393 | 395 |
394 } // namespace content | 396 } // namespace content |
395 | 397 |
396 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ | 398 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ |
OLD | NEW |