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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 friend class GuestViewBase; | 97 friend class GuestViewBase; |
98 FRIEND_TEST_ALL_PREFIXES(GuestViewManagerTest, AddRemove); | 98 FRIEND_TEST_ALL_PREFIXES(GuestViewManagerTest, AddRemove); |
99 | 99 |
100 // Can be overriden in tests. | 100 // Can be overriden in tests. |
101 virtual void AddGuest(int guest_instance_id, | 101 virtual void AddGuest(int guest_instance_id, |
102 content::WebContents* guest_web_contents); | 102 content::WebContents* guest_web_contents); |
103 | 103 |
104 // Can be overriden in tests. | 104 // Can be overriden in tests. |
105 virtual void RemoveGuest(int guest_instance_id); | 105 virtual void RemoveGuest(int guest_instance_id); |
106 | 106 |
| 107 // Indicates whether the provided |guest| can be used in the context it has |
| 108 // been created. |
| 109 bool IsGuestAvailableToContext(GuestViewBase* guest, |
| 110 std::string* owner_extension_id); |
| 111 |
107 content::WebContents* GetGuestByInstanceID(int guest_instance_id); | 112 content::WebContents* GetGuestByInstanceID(int guest_instance_id); |
108 | 113 |
109 bool CanEmbedderAccessInstanceIDMaybeKill( | 114 bool CanEmbedderAccessInstanceIDMaybeKill( |
110 int embedder_render_process_id, | 115 int embedder_render_process_id, |
111 int guest_instance_id); | 116 int guest_instance_id); |
112 | 117 |
113 bool CanEmbedderAccessInstanceID(int embedder_render_process_id, | 118 bool CanEmbedderAccessInstanceID(int embedder_render_process_id, |
114 int guest_instance_id); | 119 int guest_instance_id); |
115 | 120 |
116 // Returns true if |guest_instance_id| can be used to add a new guest to this | 121 // Returns true if |guest_instance_id| can be used to add a new guest to this |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 std::set<int> removed_instance_ids_; | 162 std::set<int> removed_instance_ids_; |
158 | 163 |
159 content::BrowserContext* context_; | 164 content::BrowserContext* context_; |
160 | 165 |
161 DISALLOW_COPY_AND_ASSIGN(GuestViewManager); | 166 DISALLOW_COPY_AND_ASSIGN(GuestViewManager); |
162 }; | 167 }; |
163 | 168 |
164 } // namespace extensions | 169 } // namespace extensions |
165 | 170 |
166 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_MANAGER_H_ | 171 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_MANAGER_H_ |
OLD | NEW |