| 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/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 int embedder_render_process_id); | 55 int embedder_render_process_id); |
| 56 | 56 |
| 57 // Associates the Browser Plugin with |element_instance_id| to a | 57 // Associates the Browser Plugin with |element_instance_id| to a |
| 58 // guest that has ID of |guest_instance_id| and sets initialization | 58 // guest that has ID of |guest_instance_id| and sets initialization |
| 59 // parameters, |params| for it. | 59 // parameters, |params| for it. |
| 60 void AttachGuest(int embedder_process_id, | 60 void AttachGuest(int embedder_process_id, |
| 61 int element_instance_id, | 61 int element_instance_id, |
| 62 int guest_instance_id, | 62 int guest_instance_id, |
| 63 const base::DictionaryValue& attach_params); | 63 const base::DictionaryValue& attach_params); |
| 64 | 64 |
| 65 // Relax GetGuestByInstanceID for now, so we can wildly access a guest by |
| 66 // its guest_instance_id. |
| 67 content::WebContents* GetGuestByInstanceIDHack(int guest_instance_id); |
| 68 |
| 65 // Removes the association between |element_instance_id| and a guest instance | 69 // Removes the association between |element_instance_id| and a guest instance |
| 66 // ID if one exists. | 70 // ID if one exists. |
| 67 void DetachGuest(GuestViewBase* guest); | 71 void DetachGuest(GuestViewBase* guest); |
| 68 | 72 |
| 69 int GetNextInstanceID(); | 73 int GetNextInstanceID(); |
| 70 int GetGuestInstanceIDForElementID( | 74 int GetGuestInstanceIDForElementID( |
| 71 int owner_process_id, | 75 int owner_process_id, |
| 72 int element_instance_id); | 76 int element_instance_id); |
| 73 | 77 |
| 74 using WebContentsCreatedCallback = | 78 using WebContentsCreatedCallback = |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 std::set<int> removed_instance_ids_; | 161 std::set<int> removed_instance_ids_; |
| 158 | 162 |
| 159 content::BrowserContext* context_; | 163 content::BrowserContext* context_; |
| 160 | 164 |
| 161 DISALLOW_COPY_AND_ASSIGN(GuestViewManager); | 165 DISALLOW_COPY_AND_ASSIGN(GuestViewManager); |
| 162 }; | 166 }; |
| 163 | 167 |
| 164 } // namespace extensions | 168 } // namespace extensions |
| 165 | 169 |
| 166 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_MANAGER_H_ | 170 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_MANAGER_H_ |
| OLD | NEW |