OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_MANAGER_H_ | 5 #ifndef EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_MANAGER_H_ |
6 #define EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_MANAGER_H_ | 6 #define EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_MANAGER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 int embedder_render_process_id); | 62 int embedder_render_process_id); |
63 | 63 |
64 // Associates the Browser Plugin with |element_instance_id| to a | 64 // Associates the Browser Plugin with |element_instance_id| to a |
65 // guest that has ID of |guest_instance_id| and sets initialization | 65 // guest that has ID of |guest_instance_id| and sets initialization |
66 // parameters, |params| for it. | 66 // parameters, |params| for it. |
67 void AttachGuest(int embedder_process_id, | 67 void AttachGuest(int embedder_process_id, |
68 int element_instance_id, | 68 int element_instance_id, |
69 int guest_instance_id, | 69 int guest_instance_id, |
70 const base::DictionaryValue& attach_params); | 70 const base::DictionaryValue& attach_params); |
71 | 71 |
| 72 // Relax GetGuestByInstanceID for now, so we can wildly access a guest by |
| 73 // its guest_instance_id. |
| 74 content::WebContents* GetGuestByInstanceIDHack(int guest_instance_id); |
| 75 |
72 // Removes the association between |element_instance_id| and a guest instance | 76 // Removes the association between |element_instance_id| and a guest instance |
73 // ID if one exists. | 77 // ID if one exists. |
74 void DetachGuest(GuestViewBase* guest); | 78 void DetachGuest(GuestViewBase* guest); |
75 | 79 |
76 // Indicates whether the |guest| is owned by an extension or Chrome App. | 80 // Indicates whether the |guest| is owned by an extension or Chrome App. |
77 bool IsOwnedByExtension(GuestViewBase* guest); | 81 bool IsOwnedByExtension(GuestViewBase* guest); |
78 | 82 |
79 int GetNextInstanceID(); | 83 int GetNextInstanceID(); |
80 int GetGuestInstanceIDForElementID( | 84 int GetGuestInstanceIDForElementID( |
81 int owner_process_id, | 85 int owner_process_id, |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 content::BrowserContext* context_; | 209 content::BrowserContext* context_; |
206 | 210 |
207 scoped_ptr<guestview::GuestViewManagerDelegate> delegate_; | 211 scoped_ptr<guestview::GuestViewManagerDelegate> delegate_; |
208 | 212 |
209 DISALLOW_COPY_AND_ASSIGN(GuestViewManager); | 213 DISALLOW_COPY_AND_ASSIGN(GuestViewManager); |
210 }; | 214 }; |
211 | 215 |
212 } // namespace extensions | 216 } // namespace extensions |
213 | 217 |
214 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_MANAGER_H_ | 218 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_MANAGER_H_ |
OLD | NEW |