Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 BrowserPluginGuestManager serves as a message router to BrowserPluginGuests | 5 // A BrowserPluginGuestManager serves as a message router to BrowserPluginGuests |
| 6 // for all guests within a given profile. | 6 // for all guests within a given profile. |
| 7 // Messages are routed to a particular guest instance based on an instance_id. | 7 // Messages are routed to a particular guest instance based on an instance_id. |
| 8 | 8 |
| 9 #ifndef CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_MANAGER_H_ | 9 #ifndef CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_MANAGER_H_ |
| 10 #define CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_MANAGER_H_ | 10 #define CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_MANAGER_H_ |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 80 | 80 |
| 81 // Removes the guest with the given |instance_id| from this | 81 // Removes the guest with the given |instance_id| from this |
| 82 // BrowserPluginGuestManager. | 82 // BrowserPluginGuestManager. |
| 83 void RemoveGuest(int instance_id); | 83 void RemoveGuest(int instance_id); |
| 84 | 84 |
| 85 // Returns whether the specified embedder is permitted to access the given | 85 // Returns whether the specified embedder is permitted to access the given |
| 86 // |instance_id|, and kills the embedder if not. | 86 // |instance_id|, and kills the embedder if not. |
| 87 bool CanEmbedderAccessInstanceIDMaybeKill(int embedder_render_process_id, | 87 bool CanEmbedderAccessInstanceIDMaybeKill(int embedder_render_process_id, |
| 88 int instance_id) const; | 88 int instance_id) const; |
| 89 | 89 |
| 90 typedef base::Callback<void(BrowserPluginGuest*)> GuestCallback; | |
| 91 void GetGuests(WebContentsImpl* embedder_web_contents, | |
|
nasko
2014/01/06 21:58:40
This method name doesn't make much sense. Maybe "F
Fady Samuel
2014/01/08 19:42:43
Done.
| |
| 92 GuestCallback callback); | |
| 93 | |
| 90 void DidSendScreenRects(WebContentsImpl* embedder_web_contents); | 94 void DidSendScreenRects(WebContentsImpl* embedder_web_contents); |
| 91 | 95 |
| 92 bool UnlockMouseIfNecessary(WebContentsImpl* embedder_web_contents_, | 96 bool UnlockMouseIfNecessary(WebContentsImpl* embedder_web_contents_, |
| 93 const NativeWebKeyboardEvent& event); | 97 const NativeWebKeyboardEvent& event); |
| 94 | 98 |
| 95 void OnMessageReceived(const IPC::Message& message, int render_process_id); | 99 void OnMessageReceived(const IPC::Message& message, int render_process_id); |
| 96 | 100 |
| 97 private: | 101 private: |
| 98 friend class TestBrowserPluginGuestManager; | 102 friend class TestBrowserPluginGuestManager; |
| 99 | 103 |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 130 GuestInstanceMap guest_web_contents_by_instance_id_; | 134 GuestInstanceMap guest_web_contents_by_instance_id_; |
| 131 int next_instance_id_; | 135 int next_instance_id_; |
| 132 | 136 |
| 133 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuestManager); | 137 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuestManager); |
| 134 }; | 138 }; |
| 135 | 139 |
| 136 } // namespace content | 140 } // namespace content |
| 137 | 141 |
| 138 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_MANAGER_H_ | 142 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_MANAGER_H_ |
| 139 | 143 |
| OLD | NEW |