| 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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 void RespondToPermissionRequest(int request_id, | 203 void RespondToPermissionRequest(int request_id, |
| 204 bool should_allow, | 204 bool should_allow, |
| 205 const std::string& user_input); | 205 const std::string& user_input); |
| 206 | 206 |
| 207 // Overrides factory for testing. Default (NULL) value indicates regular | 207 // Overrides factory for testing. Default (NULL) value indicates regular |
| 208 // (non-test) environment. | 208 // (non-test) environment. |
| 209 static void set_factory_for_testing(BrowserPluginHostFactory* factory) { | 209 static void set_factory_for_testing(BrowserPluginHostFactory* factory) { |
| 210 BrowserPluginGuest::factory_ = factory; | 210 BrowserPluginGuest::factory_ = factory; |
| 211 } | 211 } |
| 212 | 212 |
| 213 void SetZoom(double zoom_factor); | |
| 214 | |
| 215 void PointerLockPermissionResponse(bool allow); | 213 void PointerLockPermissionResponse(bool allow); |
| 216 | 214 |
| 217 private: | 215 private: |
| 218 class EmbedderWebContentsObserver; | 216 class EmbedderWebContentsObserver; |
| 219 friend class TestBrowserPluginGuest; | 217 friend class TestBrowserPluginGuest; |
| 220 | 218 |
| 221 // BrowserPluginGuest is a WebContentsObserver of |web_contents| and | 219 // BrowserPluginGuest is a WebContentsObserver of |web_contents| and |
| 222 // |web_contents| has to stay valid for the lifetime of BrowserPluginGuest. | 220 // |web_contents| has to stay valid for the lifetime of BrowserPluginGuest. |
| 223 BrowserPluginGuest(int instance_id, | 221 BrowserPluginGuest(int instance_id, |
| 224 bool has_render_view, | 222 bool has_render_view, |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 // Weak pointer used to ask GeolocationPermissionContext about geolocation | 401 // Weak pointer used to ask GeolocationPermissionContext about geolocation |
| 404 // permission. | 402 // permission. |
| 405 base::WeakPtrFactory<BrowserPluginGuest> weak_ptr_factory_; | 403 base::WeakPtrFactory<BrowserPluginGuest> weak_ptr_factory_; |
| 406 | 404 |
| 407 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); | 405 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); |
| 408 }; | 406 }; |
| 409 | 407 |
| 410 } // namespace content | 408 } // namespace content |
| 411 | 409 |
| 412 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ | 410 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ |
| OLD | NEW |