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 #include "extensions/browser/guest_view/extension_options/extension_options_gues
t.h" | 5 #include "extensions/browser/guest_view/extension_options/extension_options_gues
t.h" |
6 | 6 |
7 #include "base/values.h" | 7 #include "base/values.h" |
8 #include "components/crx_file/id_util.h" | 8 #include "components/crx_file/id_util.h" |
9 #include "content/public/browser/render_process_host.h" | 9 #include "content/public/browser/render_process_host.h" |
10 #include "content/public/browser/site_instance.h" | 10 #include "content/public/browser/site_instance.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 int guest_instance_id) { | 52 int guest_instance_id) { |
53 if (!extensions::FeatureSwitch::embedded_extension_options()->IsEnabled()) { | 53 if (!extensions::FeatureSwitch::embedded_extension_options()->IsEnabled()) { |
54 return NULL; | 54 return NULL; |
55 } | 55 } |
56 return new ExtensionOptionsGuest(browser_context, guest_instance_id); | 56 return new ExtensionOptionsGuest(browser_context, guest_instance_id); |
57 } | 57 } |
58 | 58 |
59 void ExtensionOptionsGuest::CreateWebContents( | 59 void ExtensionOptionsGuest::CreateWebContents( |
60 const std::string& embedder_extension_id, | 60 const std::string& embedder_extension_id, |
61 int embedder_render_process_id, | 61 int embedder_render_process_id, |
| 62 const GURL& embedder_site_url, |
62 const base::DictionaryValue& create_params, | 63 const base::DictionaryValue& create_params, |
63 const WebContentsCreatedCallback& callback) { | 64 const WebContentsCreatedCallback& callback) { |
64 // Get the extension's base URL. | 65 // Get the extension's base URL. |
65 std::string extension_id; | 66 std::string extension_id; |
66 create_params.GetString(extensionoptions::kExtensionId, &extension_id); | 67 create_params.GetString(extensionoptions::kExtensionId, &extension_id); |
67 | 68 |
68 if (!crx_file::id_util::IdIsValid(extension_id)) { | 69 if (!crx_file::id_util::IdIsValid(extension_id)) { |
69 callback.Run(NULL); | 70 callback.Run(NULL); |
70 return; | 71 return; |
71 } | 72 } |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 attach_params()->GetInteger(extensionoptions::kAttributeMinWidth, &min_width); | 252 attach_params()->GetInteger(extensionoptions::kAttributeMinWidth, &min_width); |
252 | 253 |
253 // Call SetAutoSize to apply all the appropriate validation and clipping of | 254 // Call SetAutoSize to apply all the appropriate validation and clipping of |
254 // values. | 255 // values. |
255 SetAutoSize(auto_size_enabled, | 256 SetAutoSize(auto_size_enabled, |
256 gfx::Size(min_width, min_height), | 257 gfx::Size(min_width, min_height), |
257 gfx::Size(max_width, max_height)); | 258 gfx::Size(max_width, max_height)); |
258 } | 259 } |
259 | 260 |
260 } // namespace extensions | 261 } // namespace extensions |
OLD | NEW |