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_BASE_H_ | 5 #ifndef EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_BASE_H_ |
6 #define EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_BASE_H_ | 6 #define EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_BASE_H_ |
7 | 7 |
8 #include <queue> | 8 #include <queue> |
9 | 9 |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 virtual int GetTaskPrefix() const = 0; | 153 virtual int GetTaskPrefix() const = 0; |
154 | 154 |
155 // This method is to be implemented by the derived class. Given a set of | 155 // This method is to be implemented by the derived class. Given a set of |
156 // initialization parameters, a concrete subclass of GuestViewBase can | 156 // initialization parameters, a concrete subclass of GuestViewBase can |
157 // create a specialized WebContents that it returns back to GuestViewBase. | 157 // create a specialized WebContents that it returns back to GuestViewBase. |
158 typedef base::Callback<void(content::WebContents*)> | 158 typedef base::Callback<void(content::WebContents*)> |
159 WebContentsCreatedCallback; | 159 WebContentsCreatedCallback; |
160 virtual void CreateWebContents( | 160 virtual void CreateWebContents( |
161 const std::string& embedder_extension_id, | 161 const std::string& embedder_extension_id, |
162 int embedder_render_process_id, | 162 int embedder_render_process_id, |
| 163 const GURL& embedder_site_url, |
163 const base::DictionaryValue& create_params, | 164 const base::DictionaryValue& create_params, |
164 const WebContentsCreatedCallback& callback) = 0; | 165 const WebContentsCreatedCallback& callback) = 0; |
165 | 166 |
166 // This creates a WebContents and initializes |this| GuestViewBase to use the | 167 // This creates a WebContents and initializes |this| GuestViewBase to use the |
167 // newly created WebContents. | 168 // newly created WebContents. |
168 void Init(const std::string& embedder_extension_id, | 169 void Init(const std::string& embedder_extension_id, |
169 content::WebContents* embedder_web_contents, | 170 content::WebContents* embedder_web_contents, |
170 const base::DictionaryValue& create_params, | 171 const base::DictionaryValue& create_params, |
171 const WebContentsCreatedCallback& callback); | 172 const WebContentsCreatedCallback& callback); |
172 | 173 |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 // This is used to ensure pending tasks will not fire after this object is | 341 // This is used to ensure pending tasks will not fire after this object is |
341 // destroyed. | 342 // destroyed. |
342 base::WeakPtrFactory<GuestViewBase> weak_ptr_factory_; | 343 base::WeakPtrFactory<GuestViewBase> weak_ptr_factory_; |
343 | 344 |
344 DISALLOW_COPY_AND_ASSIGN(GuestViewBase); | 345 DISALLOW_COPY_AND_ASSIGN(GuestViewBase); |
345 }; | 346 }; |
346 | 347 |
347 } // namespace extensions | 348 } // namespace extensions |
348 | 349 |
349 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_BASE_H_ | 350 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_BASE_H_ |
OLD | NEW |