Chromium Code Reviews| 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 BrowserPluginEmbedder has a list of guests it manages. | 5 // A BrowserPluginEmbedder has a list of guests it manages. |
| 6 // In the beginning when a renderer sees one or more guests (BrowserPlugin | 6 // In the beginning when a renderer sees one or more guests (BrowserPlugin |
| 7 // instance(s)) and there is a request to navigate to them, the WebContents for | 7 // instance(s)) and there is a request to navigate to them, the WebContents for |
| 8 // that renderer creates a BrowserPluginEmbedder for itself. The | 8 // that renderer creates a BrowserPluginEmbedder for itself. The |
| 9 // BrowserPluginEmbedder, in turn, manages a set of BrowserPluginGuests -- one | 9 // BrowserPluginEmbedder, in turn, manages a set of BrowserPluginGuests -- one |
| 10 // BrowserPluginGuest for each guest in the embedding WebContents. Note that | 10 // BrowserPluginGuest for each guest in the embedding WebContents. Note that |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 100 // Handles input events sent from the BrowserPlugin (embedder's renderer | 100 // Handles input events sent from the BrowserPlugin (embedder's renderer |
| 101 // process) by passing them to appropriate guest's input handler. | 101 // process) by passing them to appropriate guest's input handler. |
| 102 void HandleInputEvent(int instance_id, | 102 void HandleInputEvent(int instance_id, |
| 103 RenderViewHost* render_view_host, | 103 RenderViewHost* render_view_host, |
| 104 const gfx::Rect& guest_rect, | 104 const gfx::Rect& guest_rect, |
| 105 const WebKit::WebInputEvent& event, | 105 const WebKit::WebInputEvent& event, |
| 106 IPC::Message* reply_message); | 106 IPC::Message* reply_message); |
| 107 void PluginDestroyed(int instance_id); | 107 void PluginDestroyed(int instance_id); |
| 108 void SetGuestVisibility(int instance_id, | 108 void SetGuestVisibility(int instance_id, |
| 109 bool guest_visible); | 109 bool guest_visible); |
| 110 // Allows or denies browser plugin's media access request. | |
|
Charlie Reis
2012/10/17 06:18:45
nit: s/browser plugin's/a guest's/
Also add "afte
lazyboy
2012/10/17 09:09:53
Done.
| |
| 111 void AllowMediaAccess(int instance_id, int request_id, bool allow); | |
|
Charlie Reis
2012/10/17 06:18:45
nit: should_allow
lazyboy
2012/10/17 09:09:53
Done.
| |
| 110 | 112 |
| 111 // Overrides factory for testing. Default (NULL) value indicates regular | 113 // Overrides factory for testing. Default (NULL) value indicates regular |
| 112 // (non-test) environment. | 114 // (non-test) environment. |
| 113 static void set_factory_for_testing(BrowserPluginHostFactory* factory) { | 115 static void set_factory_for_testing(BrowserPluginHostFactory* factory) { |
| 114 factory_ = factory; | 116 factory_ = factory; |
| 115 } | 117 } |
| 116 | 118 |
| 117 private: | 119 private: |
| 118 friend class TestBrowserPluginEmbedder; | 120 friend class TestBrowserPluginEmbedder; |
| 119 | 121 |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 147 ContainerInstanceMap guest_web_contents_by_instance_id_; | 149 ContainerInstanceMap guest_web_contents_by_instance_id_; |
| 148 RenderViewHost* render_view_host_; | 150 RenderViewHost* render_view_host_; |
| 149 bool visible_; | 151 bool visible_; |
| 150 | 152 |
| 151 DISALLOW_COPY_AND_ASSIGN(BrowserPluginEmbedder); | 153 DISALLOW_COPY_AND_ASSIGN(BrowserPluginEmbedder); |
| 152 }; | 154 }; |
| 153 | 155 |
| 154 } // namespace content | 156 } // namespace content |
| 155 | 157 |
| 156 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_EMBEDDER_H_ | 158 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_EMBEDDER_H_ |
| OLD | NEW |