| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 bool ExtensionOptionsGuest::HandleContextMenu( | 183 bool ExtensionOptionsGuest::HandleContextMenu( |
| 184 const content::ContextMenuParams& params) { | 184 const content::ContextMenuParams& params) { |
| 185 if (!extension_options_guest_delegate_) | 185 if (!extension_options_guest_delegate_) |
| 186 return false; | 186 return false; |
| 187 | 187 |
| 188 return extension_options_guest_delegate_->HandleContextMenu(params); | 188 return extension_options_guest_delegate_->HandleContextMenu(params); |
| 189 } | 189 } |
| 190 | 190 |
| 191 bool ExtensionOptionsGuest::ShouldCreateWebContents( | 191 bool ExtensionOptionsGuest::ShouldCreateWebContents( |
| 192 content::WebContents* web_contents, | 192 content::WebContents* web_contents, |
| 193 content::RenderFrameHost* opener, |
| 193 content::SiteInstance* source_site_instance, | 194 content::SiteInstance* source_site_instance, |
| 194 int32_t route_id, | 195 int32_t route_id, |
| 195 int32_t main_frame_route_id, | 196 int32_t main_frame_route_id, |
| 196 int32_t main_frame_widget_route_id, | 197 int32_t main_frame_widget_route_id, |
| 197 content::mojom::WindowContainerType window_container_type, | 198 content::mojom::WindowContainerType window_container_type, |
| 198 const GURL& opener_url, | 199 const GURL& opener_url, |
| 199 const std::string& frame_name, | 200 const std::string& frame_name, |
| 200 const GURL& target_url, | 201 const GURL& target_url, |
| 201 const std::string& partition_id, | 202 const std::string& partition_id, |
| 202 content::SessionStorageNamespace* session_storage_namespace) { | 203 content::SessionStorageNamespace* session_storage_namespace) { |
| (...skipping 25 matching lines...) Expand all Loading... |
| 228 guest_zoom_controller->SetZoomMode(zoom::ZoomController::ZOOM_MODE_ISOLATED); | 229 guest_zoom_controller->SetZoomMode(zoom::ZoomController::ZOOM_MODE_ISOLATED); |
| 229 SetGuestZoomLevelToMatchEmbedder(); | 230 SetGuestZoomLevelToMatchEmbedder(); |
| 230 | 231 |
| 231 if (!url::IsSameOriginWith(navigation_handle->GetURL(), options_page_)) { | 232 if (!url::IsSameOriginWith(navigation_handle->GetURL(), options_page_)) { |
| 232 bad_message::ReceivedBadMessage(web_contents()->GetRenderProcessHost(), | 233 bad_message::ReceivedBadMessage(web_contents()->GetRenderProcessHost(), |
| 233 bad_message::EOG_BAD_ORIGIN); | 234 bad_message::EOG_BAD_ORIGIN); |
| 234 } | 235 } |
| 235 } | 236 } |
| 236 | 237 |
| 237 } // namespace extensions | 238 } // namespace extensions |
| OLD | NEW |