| 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. It has a | 9 // BrowserPluginGuest lives on the UI thread of the browser process. It has a |
| 10 // helper, BrowserPluginGuestHelper, which is a RenderViewHostObserver. The | 10 // helper, BrowserPluginGuestHelper, which is a RenderViewHostObserver. The |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 | 51 |
| 52 namespace WebKit { | 52 namespace WebKit { |
| 53 class WebInputEvent; | 53 class WebInputEvent; |
| 54 } | 54 } |
| 55 | 55 |
| 56 namespace content { | 56 namespace content { |
| 57 | 57 |
| 58 class BrowserPluginHostFactory; | 58 class BrowserPluginHostFactory; |
| 59 class BrowserPluginEmbedder; | 59 class BrowserPluginEmbedder; |
| 60 class RenderProcessHost; | 60 class RenderProcessHost; |
| 61 class RenderWidgetHostView; |
| 61 | 62 |
| 62 // A browser plugin guest provides functionality for WebContents to operate in | 63 // A browser plugin guest provides functionality for WebContents to operate in |
| 63 // the guest role and implements guest specific overrides for ViewHostMsg_* | 64 // the guest role and implements guest specific overrides for ViewHostMsg_* |
| 64 // messages. | 65 // messages. |
| 65 // | 66 // |
| 66 // BrowserPluginEmbedder is responsible for creating and destroying a guest. | 67 // BrowserPluginEmbedder is responsible for creating and destroying a guest. |
| 67 class CONTENT_EXPORT BrowserPluginGuest : public NotificationObserver, | 68 class CONTENT_EXPORT BrowserPluginGuest : public NotificationObserver, |
| 68 public WebContentsDelegate, | 69 public WebContentsDelegate, |
| 69 public WebContentsObserver { | 70 public WebContentsObserver { |
| 70 public: | 71 public: |
| (...skipping 19 matching lines...) Expand all Loading... |
| 90 guest_hang_timeout_ = timeout; | 91 guest_hang_timeout_ = timeout; |
| 91 } | 92 } |
| 92 | 93 |
| 93 void set_embedder_web_contents(WebContentsImpl* web_contents) { | 94 void set_embedder_web_contents(WebContentsImpl* web_contents) { |
| 94 embedder_web_contents_ = web_contents; | 95 embedder_web_contents_ = web_contents; |
| 95 } | 96 } |
| 96 WebContentsImpl* embedder_web_contents() const { | 97 WebContentsImpl* embedder_web_contents() const { |
| 97 return embedder_web_contents_; | 98 return embedder_web_contents_; |
| 98 } | 99 } |
| 99 | 100 |
| 101 RenderWidgetHostView* GetEmbedderRenderWidgetHostView(); |
| 102 |
| 100 bool focused() const { return focused_; } | 103 bool focused() const { return focused_; } |
| 101 bool visible() const { return guest_visible_; } | 104 bool visible() const { return guest_visible_; } |
| 102 void clear_damage_buffer() { damage_buffer_.reset(); } | 105 void clear_damage_buffer() { damage_buffer_.reset(); } |
| 103 | 106 |
| 104 void UpdateVisibility(); | 107 void UpdateVisibility(); |
| 105 | 108 |
| 106 // NotificationObserver implementation. | 109 // NotificationObserver implementation. |
| 107 virtual void Observe(int type, | 110 virtual void Observe(int type, |
| 108 const NotificationSource& source, | 111 const NotificationSource& source, |
| 109 const NotificationDetails& details) OVERRIDE; | 112 const NotificationDetails& details) OVERRIDE; |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 gfx::Size max_auto_size_; | 327 gfx::Size max_auto_size_; |
| 325 gfx::Size min_auto_size_; | 328 gfx::Size min_auto_size_; |
| 326 bool destroy_called_; | 329 bool destroy_called_; |
| 327 | 330 |
| 328 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); | 331 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); |
| 329 }; | 332 }; |
| 330 | 333 |
| 331 } // namespace content | 334 } // namespace content |
| 332 | 335 |
| 333 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ | 336 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ |
| OLD | NEW |