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/metrics/user_metrics.h" | 7 #include "base/metrics/user_metrics.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "components/crx_file/id_util.h" | 9 #include "components/crx_file/id_util.h" |
10 #include "content/public/browser/navigation_details.h" | 10 #include "content/public/browser/navigation_details.h" |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 const content::ContextMenuParams& params) { | 205 const content::ContextMenuParams& params) { |
206 if (!extension_options_guest_delegate_) | 206 if (!extension_options_guest_delegate_) |
207 return false; | 207 return false; |
208 | 208 |
209 return extension_options_guest_delegate_->HandleContextMenu(params); | 209 return extension_options_guest_delegate_->HandleContextMenu(params); |
210 } | 210 } |
211 | 211 |
212 bool ExtensionOptionsGuest::ShouldCreateWebContents( | 212 bool ExtensionOptionsGuest::ShouldCreateWebContents( |
213 content::WebContents* web_contents, | 213 content::WebContents* web_contents, |
214 int route_id, | 214 int route_id, |
| 215 int main_frame_route_id, |
215 WindowContainerType window_container_type, | 216 WindowContainerType window_container_type, |
216 const base::string16& frame_name, | 217 const base::string16& frame_name, |
217 const GURL& target_url, | 218 const GURL& target_url, |
218 const std::string& partition_id, | 219 const std::string& partition_id, |
219 content::SessionStorageNamespace* session_storage_namespace) { | 220 content::SessionStorageNamespace* session_storage_namespace) { |
220 // This method handles opening links from within the guest. Since this guest | 221 // This method handles opening links from within the guest. Since this guest |
221 // view is used for displaying embedded extension options, we want any | 222 // view is used for displaying embedded extension options, we want any |
222 // external links to be opened in a new tab, not in a new guest view. | 223 // external links to be opened in a new tab, not in a new guest view. |
223 // Therefore we just open the URL in a new tab, and since we aren't handling | 224 // Therefore we just open the URL in a new tab, and since we aren't handling |
224 // the new web contents, we return false. | 225 // the new web contents, we return false. |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 attach_params()->GetInteger(extensionoptions::kAttributeMinWidth, &min_width); | 280 attach_params()->GetInteger(extensionoptions::kAttributeMinWidth, &min_width); |
280 | 281 |
281 // Call SetAutoSize to apply all the appropriate validation and clipping of | 282 // Call SetAutoSize to apply all the appropriate validation and clipping of |
282 // values. | 283 // values. |
283 SetAutoSize(auto_size_enabled, | 284 SetAutoSize(auto_size_enabled, |
284 gfx::Size(min_width, min_height), | 285 gfx::Size(min_width, min_height), |
285 gfx::Size(max_width, max_height)); | 286 gfx::Size(max_width, max_height)); |
286 } | 287 } |
287 | 288 |
288 } // namespace extensions | 289 } // namespace extensions |
OLD | NEW |