| 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 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 517 const base::Callback<void(bool)>& callback, | 517 const base::Callback<void(bool)>& callback, |
| 518 const std::string& url); | 518 const std::string& url); |
| 519 | 519 |
| 520 // Embedder sets permission to allow or deny geolocation request. | 520 // Embedder sets permission to allow or deny geolocation request. |
| 521 void SetGeolocationPermission( | 521 void SetGeolocationPermission( |
| 522 GeolocationCallback callback, int bridge_id, bool allowed); | 522 GeolocationCallback callback, int bridge_id, bool allowed); |
| 523 | 523 |
| 524 // Forwards all messages from the |pending_messages_| queue to the embedder. | 524 // Forwards all messages from the |pending_messages_| queue to the embedder. |
| 525 void SendQueuedMessages(); | 525 void SendQueuedMessages(); |
| 526 | 526 |
| 527 // Weak pointer used to ask GeolocationPermissionContext about geolocation | |
| 528 // permission. | |
| 529 base::WeakPtrFactory<BrowserPluginGuest> weak_ptr_factory_; | |
| 530 | |
| 531 // Static factory instance (always NULL for non-test). | 527 // Static factory instance (always NULL for non-test). |
| 532 static BrowserPluginHostFactory* factory_; | 528 static BrowserPluginHostFactory* factory_; |
| 533 | 529 |
| 534 scoped_ptr<EmbedderWebContentsObserver> embedder_web_contents_observer_; | 530 scoped_ptr<EmbedderWebContentsObserver> embedder_web_contents_observer_; |
| 535 WebContentsImpl* embedder_web_contents_; | 531 WebContentsImpl* embedder_web_contents_; |
| 536 | 532 |
| 537 std::map<int, int> bridge_id_to_request_id_map_; | 533 std::map<int, int> bridge_id_to_request_id_map_; |
| 538 | 534 |
| 539 // An identifier that uniquely identifies a browser plugin guest within an | 535 // An identifier that uniquely identifies a browser plugin guest within an |
| 540 // embedder. | 536 // embedder. |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 593 // This is a queue of messages that are destined to be sent to the embedder | 589 // This is a queue of messages that are destined to be sent to the embedder |
| 594 // once the guest is attached to a particular embedder. | 590 // once the guest is attached to a particular embedder. |
| 595 std::queue<IPC::Message*> pending_messages_; | 591 std::queue<IPC::Message*> pending_messages_; |
| 596 | 592 |
| 597 scoped_ptr<BrowserPluginGuestDelegate> delegate_; | 593 scoped_ptr<BrowserPluginGuestDelegate> delegate_; |
| 598 | 594 |
| 599 // These are parameters passed from JavaScript on attachment to the content | 595 // These are parameters passed from JavaScript on attachment to the content |
| 600 // embedder. | 596 // embedder. |
| 601 scoped_ptr<base::DictionaryValue> extra_attach_params_; | 597 scoped_ptr<base::DictionaryValue> extra_attach_params_; |
| 602 | 598 |
| 599 // Weak pointer used to ask GeolocationPermissionContext about geolocation |
| 600 // permission. |
| 601 base::WeakPtrFactory<BrowserPluginGuest> weak_ptr_factory_; |
| 602 |
| 603 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); | 603 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); |
| 604 }; | 604 }; |
| 605 | 605 |
| 606 } // namespace content | 606 } // namespace content |
| 607 | 607 |
| 608 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ | 608 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ |
| OLD | NEW |